As it is, the test checks if the return value is `undefined` in other platforms. But it should also make sure that the `O_NOATIME` should be found only in Linux. PR-URL: https://github.com/nodejs/node/pull/6614 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
12 lines
294 B
JavaScript
12 lines
294 B
JavaScript
'use strict';
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const constants = process.binding('constants');
|
|
|
|
if (process.platform === 'linux') {
|
|
assert('O_NOATIME' in constants);
|
|
assert.strictEqual(constants.O_NOATIME, 0x40000);
|
|
} else {
|
|
assert(!('O_NOATIME' in constants));
|
|
}
|