diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/code/ops.typ | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/typ/code/ops.typ b/tests/typ/code/ops.typ index b81fc841..899ee71c 100644 --- a/tests/typ/code/ops.typ +++ b/tests/typ/code/ops.typ @@ -165,7 +165,26 @@ { x += "thing" } #test(x, "something") --- -// Test with operator. +// Test `in` operator. +#test("hi" in "worship", true) +#test("hi" in ("we", "hi", "bye"), true) +#test("Hey" in "abHeyCd", true) +#test("Hey" in "abheyCd", false) +#test(5 in range(10), true) +#test(12 in range(10), false) +#test("" in (), false) +#test("key" in (key: "value"), true) +#test("value" in (key: "value"), false) +#test("Hey" not in "abheyCd", true) +#test("a" not +/* fun comment? */ in "abc", false) + +--- +// Error: 9 expected keyword `in` +{"a" not} + +--- +// Test `with` operator. // Apply positional arguments. #let add(x, y) = x + y |
