mirror of
https://github.com/nodejs/node.git
synced 2025-05-21 06:53:52 +00:00

`process.title` would work properly only in FreeBSD, OSX, and Linux as per test/parallel/test-setproctitle.js. This patch makes sure that the test expects an empty string in other platforms. This patch helps fix the SmartOS failures in https://ci.nodejs.org/job/node-test-commit/6962/ for https://github.com/nodejs/node/pull/10456 PR-URL: https://github.com/nodejs/node/pull/10597 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Evan Lucas <evanlucas@me.com>
82 lines
1.3 KiB
JavaScript
82 lines
1.3 KiB
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const repl = require('./helper-debugger-repl.js');
|
|
|
|
repl.startDebugger('breakpoints.js');
|
|
|
|
var addTest = repl.addTest;
|
|
|
|
// Next
|
|
addTest('n', [
|
|
/break in .*:11/,
|
|
/9/, /10/, /11/, /12/, /13/
|
|
]);
|
|
|
|
// Watch
|
|
addTest('watch("\'x\'")');
|
|
|
|
// Continue
|
|
addTest('c', [
|
|
/break in .*:5/,
|
|
/Watchers/,
|
|
/0:\s+'x' = "x"/,
|
|
/()/,
|
|
/3/, /4/, /5/, /6/, /7/
|
|
]);
|
|
|
|
// Show watchers
|
|
addTest('watchers', [
|
|
/0:\s+'x' = "x"/
|
|
]);
|
|
|
|
// Unwatch
|
|
addTest('unwatch("\'x\'")');
|
|
|
|
// Step out
|
|
addTest('o', [
|
|
/break in .*:12/,
|
|
/10/, /11/, /12/, /13/, /14/
|
|
]);
|
|
|
|
// Continue
|
|
addTest('c', [
|
|
/break in .*:5/,
|
|
/3/, /4/, /5/, /6/, /7/
|
|
]);
|
|
|
|
// Set breakpoint by function name
|
|
addTest('sb("setInterval()", "!(setInterval.flag++)")', [
|
|
/1/, /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/
|
|
]);
|
|
|
|
// Continue
|
|
addTest('c', [
|
|
/break in timers.js:\d+/,
|
|
/\d/, /\d/, /\d/, /\d/, /\d/
|
|
]);
|
|
|
|
// Execute
|
|
addTest('exec process.title', [
|
|
common.isFreeBSD || common.isOSX || common.isLinux ? /node/ : ''
|
|
]);
|
|
|
|
// Execute
|
|
addTest('exec exec process.title', [
|
|
/SyntaxError: Unexpected identifier/
|
|
]);
|
|
|
|
// REPL and process.env regression
|
|
addTest('repl', [
|
|
/Ctrl/
|
|
]);
|
|
|
|
addTest('for (var i in process.env) delete process.env[i]', []);
|
|
|
|
addTest('process.env', [
|
|
/\{\}/
|
|
]);
|
|
|
|
addTest('arr = [{foo: "bar"}]', [
|
|
/\[ \{ foo: 'bar' \} \]/
|
|
]);
|