Skip to content

Commit

Permalink
Test for nested char class escape in template literal
Browse files Browse the repository at this point in the history
  • Loading branch information
hlysine committed Aug 21, 2023
1 parent b0443f7 commit 666c029
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,7 @@ describe('charIn', () => {
expect(notCharIn`a-z`(charIn`A-Z`).toString()).toBe('[^a-zA-Z]');
expect(charIn`a-z`(exactly`[A-Z]`).toString()).toBe('[a-z\\[A\\-Z\\]]');
expect(charIn`abc`(charIn`-z`).toString()).toBe('[abc\\-z]');
expect(charIn`abc${charIn`-z`}`.toString()).toBe('[abc\\-z]');
expect(charIn`abc-`(charIn`z`).toString()).toBe('[abc\\-z]');
expect(charIn`abc\\`(charIn`z`).toString()).toBe('[abc\\\\z]');
expect(charIn`abc\\-`(charIn`z`).toString()).toBe('[abc\\-z]');
Expand Down

0 comments on commit 666c029

Please sign in to comment.