mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
425 B
23 lines
425 B
13 years ago
|
var common = require('../common');
|
||
13 years ago
|
var assert = require('assert');
|
||
|
var fs = require('fs');
|
||
|
var f = __filename;
|
||
|
var exists;
|
||
|
var doesNotExist;
|
||
|
|
||
|
fs.exists(f, function(y) {
|
||
|
exists = y;
|
||
|
});
|
||
|
|
||
13 years ago
|
fs.exists(f + '-NO', function(y) {
|
||
13 years ago
|
doesNotExist = y;
|
||
|
});
|
||
|
|
||
|
assert(fs.existsSync(f));
|
||
|
assert(!fs.existsSync(f + '-NO'));
|
||
|
|
||
13 years ago
|
process.on('exit', function() {
|
||
13 years ago
|
assert.strictEqual(exists, true);
|
||
|
assert.strictEqual(doesNotExist, false);
|
||
|
});
|