Skip to content

Commit

Permalink
Node "0.10", "0.12" compatibility: Replace octal values by decimals i…
Browse files Browse the repository at this point in the history
…n testcases
  • Loading branch information
nknapp committed Jul 22, 2016
1 parent 2837463 commit 40ccb35
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/fs-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ describe('m-io/fs', function () {
})

it('should create a directory with a given mode', function () {
var result = mfs.makeTree('tmp/test/make/tree/directory700', 0o700)
var result = mfs.makeTree('tmp/test/make/tree/directory700', 448) // 0o700
.then(function () {
return Q.all([
// Only the last three octals are interesting
fs.statSync('tmp/test/make').mode & 0o777,
fs.statSync('tmp/test/make/tree').mode & 0o777,
fs.statSync('tmp/test/make/tree/directory700').mode & 0o777
fs.statSync('tmp/test/make').mode & 511, // 0o777 to keep the last 3 octals
fs.statSync('tmp/test/make/tree').mode & 511,
fs.statSync('tmp/test/make/tree/directory700').mode & 511
])
})
return result.should.eventually.deep.equal([0o700, 0o700, 0o700])
return result.should.eventually.deep.equal([448, 448, 448])
})
})

Expand Down

0 comments on commit 40ccb35

Please sign in to comment.