Skip to content

Commit

Permalink
test for \0 in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jogibear9988 committed Nov 23, 2017
1 parent 7683e30 commit f7103af
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,14 @@ describe("transform-regexp-constructors-plugin", () => {
var x = /\/x\//;
`
);

thePlugin(
"should keep NUL",
String.raw`
var x = new RegExp('\0');
`,
String.raw`
var x = /\0/;
`
);
});

0 comments on commit f7103af

Please sign in to comment.