Skip to content

Commit

Permalink
Fix add-multiline.js
Browse files Browse the repository at this point in the history
  • Loading branch information
graphemecluster authored and Ms2ger committed Nov 12, 2024
1 parent 9dbd871 commit 64c6b65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/built-ins/RegExp/regexp-modifiers/add-multiline.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ assert(re3.test("es\ns"), "$ should match newline in modified group");
var re4 = new RegExp("(?m-:es$)");
assert(re4.test("es\ns"), "$ should match newline in modified group");

var re5 = /^a(?m:^b$)c$/;
var re5 = /^a\n(?m:^b$)\nc$/;
assert(re5.test("a\nb\nc"), "^ and $ should match newline in modified group");
assert(!re5.test("\na\nb\nc"), "^ should not match newline outside modified group");
assert(!re5.test("a\nb\nc\n"), "$ should not match newline outside modified group");
assert(!re5.test("\na\nb\nc\n"), "^ and $ should not match newline outside modified group");

var re6 = new RegExp("^a(?m:^b$)c$");
var re6 = new RegExp("^a\\n(?m:^b$)\\nc$");
assert(re6.test("a\nb\nc"), "^ and $ should match newline in modified group");
assert(!re6.test("\na\nb\nc"), "^ should not match newline outside modified group");
assert(!re6.test("a\nb\nc\n"), "$ should not match newline outside modified group");
Expand Down

0 comments on commit 64c6b65

Please sign in to comment.