Skip to content

Commit 8b396e3

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
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: #6686 Reviewed-By: Ben Noorhduis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent 847b29c commit 8b396e3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repl.startDebugger('break-in-module/main.js');
77
// -- SET BREAKPOINT --
88

99
// Set breakpoint by file name + line number where the file is not loaded yet
10-
repl.addTest('sb("mod.js", 23)', [
10+
repl.addTest('sb("mod.js", 2)', [
1111
/Warning: script 'mod\.js' was not loaded yet\./,
1212
/1/, /2/, /3/, /4/, /5/, /6/
1313
]);
@@ -20,8 +20,8 @@ repl.addTest('sb(")^$*+?}{|][(.js\\\\", 1)', [
2020

2121
// continue - the breakpoint should be triggered
2222
repl.addTest('c', [
23-
/break in .*[\\\/]mod\.js:23/,
24-
/21/, /22/, /23/, /24/, /25/
23+
/break in .*[\\\/]mod\.js:2/,
24+
/1/, /2/, /3/, /4/
2525
]);
2626

2727
// -- RESTORE BREAKPOINT ON RESTART --
@@ -33,7 +33,7 @@ repl.addTest('restart', [].concat(
3333
],
3434
repl.handshakeLines,
3535
[
36-
/Restoring breakpoint mod.js:23/,
36+
/Restoring breakpoint mod.js:2/,
3737
/Warning: script 'mod\.js' was not loaded yet\./,
3838
/Restoring breakpoint \).*:\d+/,
3939
/Warning: script '\)[^']*' was not loaded yet\./
@@ -42,14 +42,14 @@ repl.addTest('restart', [].concat(
4242

4343
// continue - the breakpoint should be triggered
4444
repl.addTest('c', [
45-
/break in .*[\\\/]mod\.js:23/,
46-
/21/, /22/, /23/, /24/, /25/
45+
/break in .*[\\\/]mod\.js:2/,
46+
/1/, /2/, /3/, /4/
4747
]);
4848

4949
// -- CLEAR BREAKPOINT SET IN MODULE TO BE LOADED --
5050

51-
repl.addTest('cb("mod.js", 23)', [
52-
/18/, /./, /./, /./, /./, /./, /./, /./, /26/
51+
repl.addTest('cb("mod.js", 2)', [
52+
/1/, /2/, /3/, /4/, /5/
5353
]);
5454

5555
repl.addTest('c', [

0 commit comments

Comments
 (0)