From 8b396e3d71edb8819d06542e007f5028af315a08 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 10 May 2016 21:32:23 -0700 Subject: [PATCH] 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 Reviewed-By: Santiago Gimeno --- .../test-debugger-repl-break-in-module.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/debugger/test-debugger-repl-break-in-module.js b/test/debugger/test-debugger-repl-break-in-module.js index e439e08c24..d855dc64f4 100644 --- a/test/debugger/test-debugger-repl-break-in-module.js +++ b/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', [