mirror of
https://github.com/S2-/gitlit
synced 2025-08-04 05:10:05 +02:00
packager
This commit is contained in:
31
app/node_modules/touch/test/sanity.js
generated
vendored
Normal file
31
app/node_modules/touch/test/sanity.js
generated
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
var fs = require("fs")
|
||||
var touch = require("../touch.js")
|
||||
|
||||
function _ (fn) { return function (er) {
|
||||
if (er) throw er
|
||||
fn()
|
||||
}}
|
||||
|
||||
touch.sync("sync")
|
||||
touch("async", _(function () {
|
||||
console.log("async", fs.statSync("async"))
|
||||
console.log("sync", fs.statSync("sync"))
|
||||
|
||||
setTimeout(function () {
|
||||
touch.sync("sync")
|
||||
touch("async", _(function () {
|
||||
console.log("async", fs.statSync("async"))
|
||||
console.log("sync", fs.statSync("sync"))
|
||||
setTimeout(function () {
|
||||
touch.sync("sync")
|
||||
touch("async", _(function () {
|
||||
console.log("async", fs.statSync("async"))
|
||||
console.log("sync", fs.statSync("sync"))
|
||||
fs.unlinkSync("sync")
|
||||
fs.unlinkSync("async")
|
||||
}))
|
||||
}, 1000)
|
||||
}))
|
||||
}, 1000)
|
||||
}))
|
||||
|
Reference in New Issue
Block a user