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

Loading…
Cancel
Save