Skip to content

Commit 4330f35

Browse files
committed
context keys: parser: add a new test with unexpected operators
1 parent f866e5d commit 4330f35

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vs/platform/contextkey/test/common/parser.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ suite('Context Key Scanner', () => {
216216
assert.deepStrictEqual(parseToStr(input), "Parsing errors:\n\nExpected KEY, 'true', or 'false' but got '(' at offset 1.\n");
217217
});
218218

219+
test(`config.foo && &&bar =~ /^foo$|^bar-foo$|^joo$|^jar$/ && !foo`, () => {
220+
const input = `config.foo && &&bar =~ /^foo$|^bar-foo$|^joo$|^jar$/ && !foo`;
221+
assert.deepStrictEqual(parseToStr(input), "Parsing errors:\n\nExpected 'true', 'false', '(', KEY, KEY '=~' regex, KEY [ ('==' | '!=' | '<' | '<=' | '>' | '>=' | 'in' | 'not' 'in') value ] but got '&&' at offset 15.\n");
222+
});
223+
219224
});
220225

221226
});

0 commit comments

Comments
 (0)