Results for xtrace.test.sh

statusbashmkshkshtoyshsushbrushosh
pass 1177331215
ok 7800003
N-I 0300000
BUG 1100000
FAIL 0012161671
total19191919191919
casebashmkshkshtoyshsushbrushoshdescription
0pass pass pass FAIL FAIL pass pass unset PS4
detailsdetails
1ok pass pass FAIL FAIL FAIL FAIL set -o verbose prints unevaluated code
detailsdetailsdetailsdetailsdetails
2ok BUG FAIL FAIL FAIL FAIL pass xtrace with unprintable chars
detailsdetailsdetailsdetailsdetailsdetails
3pass pass pass FAIL FAIL pass pass xtrace with unicode chars
detailsdetails
4pass pass pass FAIL FAIL pass pass xtrace with paths
detailsdetails
5BUG pass pass FAIL FAIL pass pass xtrace with tabs
detailsdetailsdetails
6ok ok FAIL FAIL FAIL FAIL pass xtrace with whitespace, quotes, and backslash
detailsdetailsdetailsdetailsdetailsdetails
7ok pass pass FAIL FAIL pass pass xtrace with newlines
detailsdetailsdetails
8pass ok FAIL FAIL FAIL pass pass xtrace written before command executes
detailsdetailsdetailsdetails
9ok ok FAIL FAIL FAIL pass pass Assignments and assign builtins
detailsdetailsdetailsdetailsdetails
10ok N-I FAIL FAIL FAIL FAIL pass [[ ]]
detailsdetailsdetailsdetailsdetailsdetails
11pass ok FAIL FAIL FAIL FAIL ok PS4 is scoped
detailsdetailsdetailsdetailsdetailsdetails
12pass ok FAIL FAIL FAIL pass ok xtrace with variables in PS4
detailsdetailsdetailsdetailsdetails
13pass ok FAIL pass pass pass pass PS4 with unterminated ${
detailsdetails
14pass ok FAIL pass pass pass pass PS4 with unterminated $(
detailsdetails
15pass ok FAIL pass pass FAIL pass PS4 with runtime error
detailsdetailsdetails
16pass pass pass FAIL FAIL pass ok Reading $? in PS4
detailsdetailsdetails
17ok N-I FAIL FAIL FAIL FAIL pass Regression: xtrace for "declare -a a+=(v)"
detailsdetailsdetailsdetailsdetailsdetails
18pass N-I FAIL FAIL FAIL pass pass Regression: xtrace for "a+=(v)"
detailsdetailsdetailsdetails
58 passed, 18 OK, 3 not implemented, 2 BUG, 52 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

toysh0 unset PS4

[toysh stdout] Expected '1\n2\n', got ''
[toysh stderr] Expected '+ echo 1\n+ unset PS4\necho 2\n', got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush0 unset PS4

[sush stderr] Expected '+ echo 1\n+ unset PS4\necho 2\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: -x: invalid option\n'

stdout:
1
2
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: -x: invalid option
bash1 set -o verbose prints unevaluated code

stdout:
foo
bar
stderr:
x=foo
y=bar
echo $x
echo $(echo $y)
toysh1 set -o verbose prints unevaluated code

[toysh stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'set: bad -o verbose\n'

stdout:
foo
bar
stderr:
set: bad -o verbose
sush1 set -o verbose prints unevaluated code

[sush stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: verbose: invalid option name\n'

stdout:
foo
bar
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: verbose: invalid option name
brush1 set -o verbose prints unevaluated code

[brush stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got ''

stdout:
foo
bar
stderr:
osh1 set -o verbose prints unevaluated code

[osh stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'osh warning: set -o verbose not implemented\n'

stdout:
foo
bar
stderr:
osh warning: set -o verbose not implemented
bash2 xtrace with unprintable chars

stdout:
abc
stderr:
+ echo $'a\003b\004c'
mksh2 xtrace with unprintable chars

stdout:
a;c
stderr:
+ echo $'a;\004c\r'
ksh2 xtrace with unprintable chars

[ksh stdout] Expected 'a\x03b\x04c\x00d\n', got 'a;\x04c\r\n'
[ksh stderr] Expected "+ echo $'a\\u0003b\\u0004c\\u0000d'\n", got "+ echo $'a;\\004c\\r'\n"

stdout:
a;c
stderr:
+ echo $'a;\004c\r'
toysh2 xtrace with unprintable chars

[toysh stdout] Expected 'a\x03b\x04c\x00d\n', got ''
[toysh stderr] Expected "+ echo $'a\\u0003b\\u0004c\\u0000d'\n", got 'main: line 1: sh: syntax error: (\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush2 xtrace with unprintable chars

[sush stdout] Expected 'a\x03b\x04c\x00d\n', got ''
[sush stderr] Expected "+ echo $'a\\u0003b\\u0004c\\u0000d'\n", got "/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: xtrace: invalid option name\n\nthread 'main' panicked at src/proc_ctrl.rs:181:46:\ncalled `Result::unwrap()` on an `Err` value: NulError(5, [97, 3, 98, 4, 99, 0, 100])\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n"
[sush status] Expected 0, got 101

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: xtrace: invalid option name

thread 'main' panicked at src/proc_ctrl.rs:181:46:
called `Result::unwrap()` on an `Err` value: NulError(5, [97, 3, 98, 4, 99, 0, 100])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
brush2 xtrace with unprintable chars

[brush stderr] Expected "+ echo $'a\\u0003b\\u0004c\\u0000d'\n", got "+ echo $'a\\003b\\004c\\000d'\n"

stdout:
abcd
stderr:
+ echo $'a\003b\004c\000d'
toysh3 xtrace with unicode chars

[toysh stdout] Expected '[\xce\xbc] [\xce\xbc]\n', got ''
[toysh stderr] Expected "+ echo '[\xce\xbc]' '[\xce\xbc]'\n", got 'main: line 1: sh: syntax error: (\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush3 xtrace with unicode chars

[sush stderr] Expected "+ echo '[\xce\xbc]' '[\xce\xbc]'\n", got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: set: xtrace: invalid option name\n'

stdout:
[μ] [μ]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 6: set: xtrace: invalid option name
toysh4 xtrace with paths

[toysh stderr] Expected '+ echo my-dir/my_file.cc\n', got ''

stdout:
my-dir/my_file.cc
stderr:
sush4 xtrace with paths

[sush stderr] Expected '+ echo my-dir/my_file.cc\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: xtrace: invalid option name\n'

stdout:
my-dir/my_file.cc
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: xtrace: invalid option name
bash5 xtrace with tabs

stdout:
[	]
stderr:
+ echo '[	]'
toysh5 xtrace with tabs

[toysh stdout] Expected u'[\t]\n', got ''
[toysh stderr] Expected "+ echo $'[\\t]'\n", got 'main: line 1: sh: syntax error: (\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush5 xtrace with tabs

[sush stderr] Expected "+ echo $'[\\t]'\n", got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: xtrace: invalid option name\n'

stdout:
[	]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: xtrace: invalid option name
bash6 xtrace with whitespace, quotes, and backslash

stdout:
1 2 ' " \
stderr:
+ echo '1 2' \' '"' '\'
mksh6 xtrace with whitespace, quotes, and backslash

stdout:
1 2 ' " \
stderr:
+ echo '1 2' \' '"' '\'
ksh6 xtrace with whitespace, quotes, and backslash

[ksh stderr] Expected '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n', got '+ echo \'1 2\' \\\' \'"\' \'\\\'\n'

stdout:
1 2 ' " \
stderr:
+ echo '1 2' \' '"' '\'
toysh6 xtrace with whitespace, quotes, and backslash

[toysh stderr] Expected '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n', got ''

stdout:
1 2 ' " \
stderr:
sush6 xtrace with whitespace, quotes, and backslash

[sush stderr] Expected '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: xtrace: invalid option name\n'

stdout:
1 2 ' " \
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: xtrace: invalid option name
brush6 xtrace with whitespace, quotes, and backslash

[brush stderr] Expected '+ echo \'1 2\' $\'\\\'\' \'"\' $\'\\\\\'\n', got '+ echo \'1 2\' \\\' \'"\' \'\\\'\n'

stdout:
1 2 ' " \
stderr:
+ echo '1 2' \' '"' '\'
bash7 xtrace with newlines

stdout:
[
]
stderr:
+ echo '[
]'
toysh7 xtrace with newlines

[toysh stderr] Expected "+ echo $'[\\n]'\n", got " echo $'[\\n]' \n"

stdout:
[
]
stderr:
 echo $'[\n]' 
sush7 xtrace with newlines

[sush stderr] Expected "+ echo $'[\\n]'\n", got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option\n'

stdout:
[
]
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option
mksh8 xtrace written before command executes

stdout:
stderr: 
+ >&2 
+ echo one
one
+ >&2 
+ echo two
two
ksh8 xtrace written before command executes

[ksh stderr] Expected '+ echo one\none\n+ echo two\ntwo\n', got '+ >&2 \n+ echo one\none\n+ >&2 \n+ echo two\ntwo\n'

stdout:
stderr: 
+ >&2 
+ echo one
one
+ >&2 
+ echo two
two
toysh8 xtrace written before command executes

[toysh stderr] Expected '+ echo one\none\n+ echo two\ntwo\n', got ' echo one >& 2 \none\n echo two >& 2 \ntwo\n'

stdout:
stderr: 
 echo one >& 2 
one
 echo two >& 2 
two
sush8 xtrace written before command executes

[sush stderr] Expected '+ echo one\none\n+ echo two\ntwo\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option\none\ntwo\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option
one
two
bash9 Assignments and assign builtins

stdout:
2
stderr:
+ x=1
+ x=2
+ echo 2
+ readonly x=3
+ x=3
mksh9 Assignments and assign builtins

stdout:
2
stderr:
+ x=1 x=2 
+ echo 2
+ readonly 'x=3'
ksh9 Assignments and assign builtins

[ksh stderr] Expected '+ x=1\n+ x=2\n+ echo 2\n+ readonly x=3\n', got "+ x=1 x=2 \n+ echo 2\n+ readonly 'x=3'\n"

stdout:
2
stderr:
+ x=1 x=2 
+ echo 2
+ readonly 'x=3'
toysh9 Assignments and assign builtins

[toysh stderr] Expected '+ x=1\n+ x=2\n+ echo 2\n+ readonly x=3\n', got ' x=1 x=2 \n echo $x \n readonly x=3 \nsh: readonly: No such file or directory\n'
[toysh status] Expected 0, got 127

stdout:
2
stderr:
 x=1 x=2 
 echo $x 
 readonly x=3 
sh: readonly: No such file or directory
sush9 Assignments and assign builtins

[sush stderr] Expected '+ x=1\n+ x=2\n+ echo 2\n+ readonly x=3\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option\n'

stdout:
2
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option
bash10 [[ ]]

stdout:
stderr: 
+ dir=/
+ [[ -d / ]]
+ ((  a = 42  ))
mksh10 [[ ]]

stdout:
stderr: 
ksh10 [[ ]]

[ksh stderr] Expected '+ dir=/\n+ [[ -d $dir ]]\n+ (( a = 42 ))\n', got "+ dir=/ \n+ let ' a = 42 '\n"

stdout:
stderr: 
+ dir=/ 
+ let ' a = 42 '
toysh10 [[ ]]

[toysh stderr] Expected '+ dir=/\n+ [[ -d $dir ]]\n+ (( a = 42 ))\n', got 'main: line 1: sh: syntax error: (\n'
[toysh status] Expected 0, got 2

stdout:
stderr: 
main: line 1: sh: syntax error: (
sush10 [[ ]]

[sush stderr] Expected '+ dir=/\n+ [[ -d $dir ]]\n+ (( a = 42 ))\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: -x: invalid option\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 3: set: -x: invalid option
brush10 [[ ]]

[brush stderr] Expected '+ dir=/\n+ [[ -d $dir ]]\n+ (( a = 42 ))\n', got '+ dir=/\n+ [[ -d / ]]\n+ (( a = 42 ))\n'

stdout:
stderr: 
+ dir=/
+ [[ -d / ]]
+ (( a = 42 ))
mksh11 PS4 is scoped

stdout:
one
func
two
stderr:
+ echo one
+ f
+ typeset 'PS4=- '
- echo func
+ echo two
ksh11 PS4 is scoped

[ksh stderr] Expected "+ echo one\n+ f\n+ local 'PS4=- '\n- echo func\n+ echo two\n" Got "+ echo one\n+ f\n+ typeset 'PS4=- '\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
+ typeset 'PS4=- '
- echo func
+ echo two
toysh11 PS4 is scoped

[toysh stderr] Expected "+ echo one\n+ f\n+ local 'PS4=- '\n- echo func\n+ echo two\n" Got " echo one \n f \n { \n local PS4='- ' \n echo func \n echo two \n"

stdout:
one
func
two
stderr:
 echo one 
 f 
 { 
 local PS4='- ' 
 echo func 
 echo two 
sush11 PS4 is scoped

[sush stderr] Expected "+ echo one\n+ f\n+ local 'PS4=- '\n- echo func\n+ echo two\n" Got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option\n'

stdout:
one
func
two
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 1: set: -x: invalid option
brush11 PS4 is scoped

[brush stderr] Expected "+ echo one\n+ f\n+ local 'PS4=- '\n- echo func\n+ echo two\n" Got "+ echo one\n+ f\n+ local PS4='- '\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
+ local PS4='- '
- echo func
+ echo two
osh11 PS4 is scoped

stdout:
one
func
two
stderr:
+ echo one
+ f
+ local PS4='- '
- echo func
+ echo two
mksh12 xtrace with variables in PS4

stdout:
one
two
stderr:
+:x=1 
+1:echo one
+1:x=2 
+2:echo two
ksh12 xtrace with variables in PS4

[ksh stderr] Expected '+:x=1\n+1:echo one\n+1:x=2\n+2:echo two\n', got '+:x=1 \n+1:echo one\n+1:x=2 \n+2:echo two\n'

stdout:
one
two
stderr:
+:x=1 
+1:echo one
+1:x=2 
+2:echo two
toysh12 xtrace with variables in PS4

[toysh stderr] Expected '+:x=1\n+1:echo one\n+1:x=2\n+2:echo two\n', got ''

stdout:
one
two
stderr:
sush12 xtrace with variables in PS4

[sush stderr] Expected '+:x=1\n+1:echo one\n+1:x=2\n+2:echo two\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: xtrace: invalid option name\n'

stdout:
one
two
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: xtrace: invalid option name
osh12 xtrace with variables in PS4

stdout:
one
two
stderr:
+1:x=1
+1:echo one
+2:x=2
+2:echo two
mksh13 PS4 with unterminated ${

stdout:
stderr: 
mksh: no closing quote
ksh13 PS4 with unterminated ${

[ksh stdout] Expected 'one\nstatus=0\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: no closing quote
mksh14 PS4 with unterminated $(

stdout:
stderr: 
mksh: syntax error: '(' unmatched
ksh14 PS4 with unterminated $(

[ksh stdout] Expected 'one\nstatus=0\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: syntax error: unmatched '('
mksh15 PS4 with runtime error

stdout:
stderr: 
mksh: <stdin>[4]:  1 / 0 : zero divisor
ksh15 PS4 with runtime error

[ksh stdout] Expected 'one\nstatus=0\n', got ''
[ksh status] Expected 0, got 1

stdout:
stderr: 
W: ksh: <stdin>[4]:  1 / 0 : zero divisor
brush15 PS4 with runtime error

[brush stdout] Expected 'one\nstatus=0\n', got ''
[brush status] Expected 0, got 1

stdout:
stderr: 
ERROR error: arithmetic evaluation error: division by zero
ERROR error: arithmetic evaluation error: division by zero
toysh16 Reading $? in PS4

[toysh stderr] Expected '[last=0] false\n[last=1] echo ok\n', got 'last=$?] false \nlast=$?] echo ok \n'

stdout:
ok
stderr:
last=$?] false 
last=$?] echo ok 
sush16 Reading $? in PS4

[sush stderr] Expected '[last=0] false\n[last=1] echo ok\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: -x: invalid option\n'

stdout:
ok
stderr:
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 2: set: -x: invalid option
osh16 Reading $? in PS4

stdout:
ok
stderr:
[last=0] 'false'
[last=1] echo ok
bash17 Regression: xtrace for "declare -a a+=(v)"

stdout:
stderr: 
+ a+=('2')
+ declare a
mksh17 Regression: xtrace for "declare -a a+=(v)"

stdout:
stderr: 
ksh17 Regression: xtrace for "declare -a a+=(v)"

[ksh stderr] Expected '+ declare a+=(2)\n', got "E: ksh: <stdin>[5]: syntax error: unexpected '('\n"
[ksh status] Expected 0, got 1

stdout:
stderr: 
E: ksh: <stdin>[5]: syntax error: unexpected '('
toysh17 Regression: xtrace for "declare -a a+=(v)"

[toysh stderr] Expected '+ declare a+=(2)\n', got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush17 Regression: xtrace for "declare -a a+=(v)"

[sush stderr] Expected '+ declare a+=(2)\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: -x: invalid option\n'

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: -x: invalid option
brush17 Regression: xtrace for "declare -a a+=(v)"

[brush stderr] Expected '+ declare a+=(2)\n', got "+ declare a+='(2)'\n"

stdout:
stderr: 
+ declare a+='(2)'
mksh18 Regression: xtrace for "a+=(v)"

stdout:
stderr: 
ksh18 Regression: xtrace for "a+=(v)"

[ksh stderr] Expected '+ a+=(2)\n', got '+ set -A a+ -- 2\n'

stdout:
stderr: 
+ set -A a+ -- 2
toysh18 Regression: xtrace for "a+=(v)"

[toysh stderr] Expected '+ a+=(2)\n', got 'munmap_chunk(): invalid pointer\n'
[toysh status] Expected 0, got -6

stdout:
stderr: 
munmap_chunk(): invalid pointer
sush18 Regression: xtrace for "a+=(v)"

[sush stderr] Expected '+ a+=(2)\n', got '/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: -x: invalid option\n'
[sush status] Expected 0, got 2

stdout:
stderr: 
/home/andy/git/oils-for-unix/oils/../../shells/rusty_bash/target/release/sush: line 4: set: -x: invalid option