mirror of https://github.com/lukechilds/node.git
Micheil Smith
15 years ago
committed by
Ryan Dahl
4 changed files with 68 additions and 1 deletions
@ -0,0 +1,27 @@ |
|||
process.mixin(require("./common")); |
|||
|
|||
var got_error = false; |
|||
var success_count = 0; |
|||
|
|||
var __file = path.join(fixturesDir, "a.js"); |
|||
|
|||
var promise = fs.chmod(__file, 0777); |
|||
|
|||
promise.addCallback(function () { |
|||
puts(fs.statSync(__file).mode); |
|||
assert.equal("777", (fs.statSync(__file).mode & 0777).toString(8)); |
|||
|
|||
fs.chmodSync(__file, 0644); |
|||
assert.equal("644", (fs.statSync(__file).mode & 0777).toString(8)); |
|||
success_count++; |
|||
}); |
|||
|
|||
promise.addErrback(function () { |
|||
got_error = true; |
|||
}); |
|||
|
|||
process.addListener("exit", function () { |
|||
assert.equal(1, success_count); |
|||
assert.equal(false, got_error); |
|||
}); |
|||
|
Loading…
Reference in new issue