Skip to content

Commit 2efda6e

Browse files
committed
test: Forgot to add tests for 'in'/'not in'
1 parent 1334f3d commit 2efda6e

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

tests/op_in.lgx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#set:string:"Hello World"
2+
#set:numbers:(1,2,3, 53.2)
3+
#set:strings:("a","b","c")
4+
5+
# --- Test with just str
6+
7+
"World" in string
8+
#expect:True
9+
10+
"Earth" in string
11+
#expect:False
12+
13+
"Earth" not in string
14+
#expect:True
15+
16+
# --- Test with list of numbers
17+
18+
3 in numbers
19+
#expect:True
20+
21+
4 in numbers
22+
#expect:False
23+
24+
4 not in numbers
25+
#expect:True
26+
27+
"a" in numbers
28+
#expect:False
29+
30+
# --- Test with list of str
31+
32+
"a" in strings
33+
#expect:True
34+
35+
"aa" in strings
36+
#expect:False
37+
38+
"x" not in strings
39+
#expect:True

0 commit comments

Comments
 (0)