Skip to content

Commit

Permalink
[tests] check current state for #10592
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Feb 4, 2025
1 parent 3c7f97e commit 948c171
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/unit/src/unitstd/EReg.unit.hx
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,14 @@ new EReg("^" + EReg.escape("\\ ^ $ * + ? . ( ) | { } [ ]") + "$", "").match("\\
// #3430
~/(\d+)/g.replace("a1234b12","$1") == "a1234b12";
~/(\d+)/g.replace("a1234b12","\\$1") == "a\\1234b\\12";
~/(\d+)/g.replace("a1234b12","$$1") == "a$1b$1";
~/(\d+)/g.replace("a1234b12","$$1") == "a$1b$1";

// #10592 - null character
var containingNull = new EReg("abc\x00def", "");
containingNull.match("abc") == false;
containingNull.match("abc\x00def") == true;
containingNull.match("abc\x00fed") == false;
var containingNull = ~/abc\x00def/;
containingNull.match("abc") == false;
containingNull.match("abc\x00def") == true;
containingNull.match("abc\x00fed") == false;

0 comments on commit 948c171

Please sign in to comment.