Skip to content

Commit

Permalink
Add more tests for charIn escapes
Browse files Browse the repository at this point in the history
  • Loading branch information
hlysine committed Aug 20, 2023
1 parent 2f87357 commit 8b7b207
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,10 @@ describe('charIn', () => {
expect(charIn`ab\\-``z\\-`.toString()).toBe('[ab\\-z-]');
expect(charIn`ab\\-``z\\\\-`.toString()).toBe('[ab\\-z\\\\-]');
expect(charIn`ab\\-``z\\\\\\-`.toString()).toBe('[ab\\-z\\\\-]');
expect(charIn` -\\`.toString()).toBe('[ -\\\\]');
expect(charIn`--a`.toString()).toBe('[--a]');
expect(charIn`^-]`.toString()).toBe('[\\^-\\]]');
expect(charIn` -]`.toString()).toBe('[ -\\]]');
});
it('is chainable and quantifiable', () => {
expect(charIn`a``b``c`.char.toString()).toBe('[abc].');
Expand Down

0 comments on commit 8b7b207

Please sign in to comment.