Skip to content

Commit 2f0f6e6

Browse files
committed
Added test cases for intersection
1 parent 42a4a4f commit 2f0f6e6

File tree

2 files changed

+434
-0
lines changed

2 files changed

+434
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/[[abc]&&[bcd]]/v; // Valid use of intersection operator, matches b or c
2+
/abc&&bcd/v; //Valid regex, but no intersection operation: Matches the literal string "abc&&bcd"
3+
/[abc]&&[bcd]/v; // Valid regex, but incorrect intersection operation:
4+
// - Matches a single character from [abc]
5+
// - Then the literal "&&"
6+
// - Then a single character from [bcd]
7+
/[[abc]&&[bcd]&&[c]]/v; // Valid use of intersection operator, matches c

0 commit comments

Comments
 (0)