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.
26 lines
537 B
26 lines
537 B
15 years ago
|
process.mixin(require("../common"));
|
||
15 years ago
|
|
||
|
var got_error = false;
|
||
|
var success_count = 0;
|
||
|
|
||
15 years ago
|
var file = path.join(fixturesDir, "a.js");
|
||
15 years ago
|
|
||
15 years ago
|
fs.chmod(file, 0777, function (err) {
|
||
|
if (err) {
|
||
|
got_error = true;
|
||
|
} else {
|
||
|
puts(fs.statSync(file).mode);
|
||
|
assert.equal(0777, fs.statSync(file).mode & 0777);
|
||
|
|
||
|
fs.chmodSync(file, 0644);
|
||
|
assert.equal(0644, fs.statSync(file).mode & 0777);
|
||
|
success_count++;
|
||
|
}
|
||
15 years ago
|
});
|
||
|
|
||
|
process.addListener("exit", function () {
|
||
|
assert.equal(1, success_count);
|
||
|
assert.equal(false, got_error);
|
||
|
});
|
||
|
|