OILS / spec / interactive-parse.test.sh View on Github | oilshell.org

37 lines, 14 significant
1# spec/interactive-parse
2
3
4## suite: disabled
5## compare_shells: bash dash mksh
6
7#### parse if
8
9case $SH in zsh) exit ;; esac
10
11export PS1='[PS1]'
12
13echo 'if true
14then
15 echo hi
16fi' | $SH -i
17
18if test -z "$OILS_VERSION"; then
19 echo '^D' # fudge
20fi
21
22## STDOUT:
23hi
24^D
25## END
26
27## stderr-json: "[PS1]> > > [PS1]"
28
29# hm somehow bash prints it more nicely; code is echo'd to stderr
30
31## OK bash STDERR:
32[PS1]if true
33> then
34> echo hi
35> fi
36[PS1]exit
37## END