test: rename regression tests

PR-URL: https://github.com/nodejs/node/pull/17948
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Tobias Nießen 2018-01-02 13:12:41 +01:00 committed by Ruben Bridgewater
parent a51944da0a
commit fb6e980e1e
No known key found for this signature in database
GPG Key ID: F07496B3EB3C1762
6 changed files with 34 additions and 8 deletions

View File

@ -1,4 +1,7 @@
'use strict';
// Tests that a spawned child process can write to stdout without throwing.
// See https://github.com/nodejs/node-v0.x-archive/issues/1899.
require('../common');
const fixtures = require('../common/fixtures');
const assert = require('assert');

View File

@ -1,4 +1,6 @@
'use strict';
// Regression test for https://github.com/nodejs/node-v0.x-archive/issues/819.
require('../common');
const net = require('net');

View File

@ -1,6 +1,7 @@
'use strict';
// Just test that destroying stdin doesn't mess up listening on a server.
// This is a regression test for GH-746.
// This is a regression test for
// https://github.com/nodejs/node-v0.x-archive/issues/746.
const common = require('../common');
const net = require('net');

View File

@ -0,0 +1,18 @@
'use strict';
// Tests that os.userInfo correctly handles errors thrown by option property
// getters. See https://github.com/nodejs/node/issues/12370.
const common = require('../common');
const assert = require('assert');
const execFile = require('child_process').execFile;
const script = `os.userInfo({
get encoding() {
throw new Error('xyz');
}
})`;
const node = process.execPath;
execFile(node, [ '-e', script ], common.mustCall((err, stdout, stderr) => {
assert(stderr.includes('Error: xyz'), 'userInfo crashes');
}));

View File

@ -20,6 +20,10 @@
// USE OR OTHER DEALINGS IN THE SOFTWARE.
'use strict';
// Tests that node does neither crash nor throw an error when accessing
// process.env when inside a VM context.
// See https://github.com/nodejs/node-v0.x-archive/issues/7511.
require('../common');
const assert = require('assert');
const vm = require('vm');

View File

@ -1,15 +1,13 @@
'use strict';
// Tests that vm.createScript and runInThisContext correctly handle errors
// thrown by option property getters.
// See https://github.com/nodejs/node/issues/12369.
const common = require('../common');
const assert = require('assert');
const execFile = require('child_process').execFile;
const scripts = [
`os.userInfo({
get encoding() {
throw new Error('xyz');
}
})`
];
const scripts = [];
['filename', 'cachedData', 'produceCachedData', 'lineOffset', 'columnOffset']
.forEach((prop) => {