Skip to content

Commit

Permalink
test: fix test-debugger-repl-break-in-module
Browse files Browse the repository at this point in the history
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: #6686
Reviewed-By: Ben Noorhduis <info@bnoordhuis.nl>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
  • Loading branch information
Trott authored and evanlucas committed May 17, 2016
1 parent f1c773d commit abb063a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/debugger/test-debugger-repl-break-in-module.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/
]);
Expand All @@ -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 --
Expand All @@ -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\./
Expand All @@ -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', [
Expand Down

0 comments on commit abb063a

Please sign in to comment.