1 #### fastlex: NUL byte not allowed inside char literal #' '
2
3 echo $'var x = #\'\x00\'; echo x=$x' > tmp.oil
4 $SH tmp.oil
5
6 echo $'var x = #\' ' > incomplete.oil
7 $SH incomplete.oil
8
9 ## status: 2
10 ## STDOUT:
11 ## END
12
13 #### fastlex: NUL byte inside shebang line
14
15 # Hm this test doesn't really tickle the bug
16
17 echo $'#! /usr/bin/env \x00 sh \necho hi' > tmp.oil
18 env OSH_HIJACK_SHEBANG=1 $SH tmp.oil
19
20 ## STDOUT:
21 hi
22 ## END
23
24 #### Tea keywords don't interfere with Oil expressions
25
26 var d = {data: 'foo'}
27
28 echo $[d->data]
29
30 var e = {enum: 1, class: 2, import: 3, const: 4, var: 5, set: 6}
31 echo $len(e)
32
33 ## STDOUT:
34 foo
35 6
36 ## END
37
38 #### Catch AttributeError
39
40 var s = 'foo'
41 echo s=$s
42 var t = s.bad()
43 echo 'should not get here'
44
45 ## status: 3
46 ## STDOUT:
47 s=foo
48 ## END