1 | # spec/interactive-parse
|
2 |
|
3 |
|
4 | ## suite: disabled
|
5 | ## compare_shells: bash dash mksh
|
6 |
|
7 | #### parse if
|
8 |
|
9 | case $SH in zsh) exit ;; esac
|
10 |
|
11 | export PS1='[PS1]'
|
12 |
|
13 | echo 'if true
|
14 | then
|
15 | echo hi
|
16 | fi' | $SH -i
|
17 |
|
18 | if test -z "$OILS_VERSION"; then
|
19 | echo '^D' # fudge
|
20 | fi
|
21 |
|
22 | ## STDOUT:
|
23 | hi
|
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
|