Skip to content

Commit 67c67cd

Browse files
committed
add more test cases
1 parent f61f9be commit 67c67cd

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

tests/fixtures/modifiers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const modifiersFixtures = [
6161
'pattern': '(?i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',
6262
'flags': 'v',
6363
'options': { unicodeSetsFlag: 'transform', modifiers: false },
64-
'expected': '(?i:(?:ab))',
64+
'expected': '(?i:(?:[Aa][Bb]))',
6565
'expectedFlags': 'u',
6666
}, {
6767
'pattern': '(?i:[\\q{ab|cd|abc}--\\q{abc}--\\q{cd}])',

tests/fixtures/unicode-set.js

+24
Original file line numberDiff line numberDiff line change
@@ -421,11 +421,35 @@ const unicodeSetFixtures = [
421421
expected: '[]',
422422
expectedFlags: 'iu'
423423
},
424+
{
425+
pattern: '[K--\\q{k}]',
426+
flags: 'iv',
427+
expected: '[]',
428+
expectedFlags: 'iu'
429+
},
424430
{
425431
pattern: '[\\u212A--k]',
426432
flags: 'iv',
427433
expected: '[]',
428434
expectedFlags: 'iu'
435+
},
436+
{
437+
pattern: '[\\q{\\u212A}--k]',
438+
flags: 'iv',
439+
expected: '[]',
440+
expectedFlags: 'iu'
441+
},
442+
{
443+
pattern: '[K--\\u212A]',
444+
flags: 'iv',
445+
expected: '[]',
446+
expectedFlags: 'iu'
447+
},
448+
{
449+
pattern: '[\\q{K}--\\q{\\u212A}]',
450+
flags: 'iv',
451+
expected: '[]',
452+
expectedFlags: 'iu'
429453
}
430454
];
431455

0 commit comments

Comments
 (0)