Browse Source

test: fix test-debugger-repl-break-in-module

The line number checks in test-debugger-repl-break-in-module were
checking for line numbers that exceed the total number of lines in the
files that were being inspected. Change the checks to match the actual
files.

PR-URL: https://github.com/nodejs/node/pull/6686
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
v4.x
Rich Trott 9 years ago
committed by Myles Borins
parent
commit
8b396e3d71
  1. 16
      test/debugger/test-debugger-repl-break-in-module.js

16
test/debugger/test-debugger-repl-break-in-module.js

@ -7,7 +7,7 @@ repl.startDebugger('break-in-module/main.js');
// -- SET BREAKPOINT -- // -- SET BREAKPOINT --
// Set breakpoint by file name + line number where the file is not loaded yet // Set breakpoint by file name + line number where the file is not loaded yet
repl.addTest('sb("mod.js", 23)', [ repl.addTest('sb("mod.js", 2)', [
/Warning: script 'mod\.js' was not loaded yet\./, /Warning: script 'mod\.js' was not loaded yet\./,
/1/, /2/, /3/, /4/, /5/, /6/ /1/, /2/, /3/, /4/, /5/, /6/
]); ]);
@ -20,8 +20,8 @@ repl.addTest('sb(")^$*+?}{|][(.js\\\\", 1)', [
// continue - the breakpoint should be triggered // continue - the breakpoint should be triggered
repl.addTest('c', [ repl.addTest('c', [
/break in .*[\\\/]mod\.js:23/, /break in .*[\\\/]mod\.js:2/,
/21/, /22/, /23/, /24/, /25/ /1/, /2/, /3/, /4/
]); ]);
// -- RESTORE BREAKPOINT ON RESTART -- // -- RESTORE BREAKPOINT ON RESTART --
@ -33,7 +33,7 @@ repl.addTest('restart', [].concat(
], ],
repl.handshakeLines, repl.handshakeLines,
[ [
/Restoring breakpoint mod.js:23/, /Restoring breakpoint mod.js:2/,
/Warning: script 'mod\.js' was not loaded yet\./, /Warning: script 'mod\.js' was not loaded yet\./,
/Restoring breakpoint \).*:\d+/, /Restoring breakpoint \).*:\d+/,
/Warning: script '\)[^']*' was not loaded yet\./ /Warning: script '\)[^']*' was not loaded yet\./
@ -42,14 +42,14 @@ repl.addTest('restart', [].concat(
// continue - the breakpoint should be triggered // continue - the breakpoint should be triggered
repl.addTest('c', [ repl.addTest('c', [
/break in .*[\\\/]mod\.js:23/, /break in .*[\\\/]mod\.js:2/,
/21/, /22/, /23/, /24/, /25/ /1/, /2/, /3/, /4/
]); ]);
// -- CLEAR BREAKPOINT SET IN MODULE TO BE LOADED -- // -- CLEAR BREAKPOINT SET IN MODULE TO BE LOADED --
repl.addTest('cb("mod.js", 23)', [ repl.addTest('cb("mod.js", 2)', [
/18/, /./, /./, /./, /./, /./, /./, /./, /26/ /1/, /2/, /3/, /4/, /5/
]); ]);
repl.addTest('c', [ repl.addTest('c', [

Loading…
Cancel
Save