Results for xtrace.test.sh

statusdashbashmkshoshosh_ALT
pass 27344
ok 52600
N-I 10000
BUG 10000
FAIL 00055
total99999
casedashbashmkshoshosh_ALTdescription
0pass ok pass FAIL FAIL set -o verbose prints unevaluated code
detailsdetailsdetails
1BUG pass pass FAIL FAIL xtrace with whitespace and quotes
detailsdetailsdetails
2N-I ok pass FAIL FAIL CASE: xtrace with newlines
detailsdetailsdetailsdetails
3pass pass ok pass pass xtrace written before command executes
details
4ok pass ok FAIL FAIL PS4 is scoped
detailsdetailsdetailsdetails
5ok pass ok FAIL FAIL xtrace with variables in PS4
detailsdetailsdetailsdetails
6ok pass ok pass pass PS4 with unterminated ${
detailsdetails
7ok pass ok pass pass PS4 with unterminated $(
detailsdetails
8ok pass ok pass pass PS4 with runtime error
detailsdetails
20 passed, 13 OK, 1 not implemented, 1 BUG, 5 failed, 0 timeouts, 0 cases skipped
5 failed under osh

Details on runs that didn't PASS

bash0 set -o verbose prints unevaluated code

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

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

stdout:
foo
bar
stderr:
Warning: set -o verbose not implemented
osh_ALT0 set -o verbose prints unevaluated code

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

stdout:
foo
bar
stderr:
Warning: set -o verbose not implemented
dash1 xtrace with whitespace and quotes

stdout:
1 2 ' "
stderr:
+ echo 1 2 ' "
osh1 xtrace with whitespace and quotes

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

stdout:
1 2 ' "
stderr:
+ echo '1 2' "'" '"'
osh_ALT1 xtrace with whitespace and quotes

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

stdout:
1 2 ' "
stderr:
+ echo '1 2' "'" '"'
dash2 CASE: xtrace with newlines

stdout:
$[
]
stderr:
+ echo $[\n]
bash2 CASE: xtrace with newlines

stdout:
[
]
stderr:
+ echo '[
]'
osh2 CASE: xtrace with newlines

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

stdout:
[
]
stderr:
+ echo '[\n]'
osh_ALT2 CASE: xtrace with newlines

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

stdout:
[
]
stderr:
+ echo '[\n]'
mksh3 xtrace written before command executes

stdout:
stderr: 
+ >&2 
+ echo one
one
+ >&2 
+ echo two
two
dash4 PS4 is scoped

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

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

[osh stderr] Expected '+ echo one\n+ f\n- echo func\n+ echo two\n', got "+ echo one\n+ f\n+ 'TODO: trace string for assignment'\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
+ 'TODO: trace string for assignment'
- echo func
+ echo two
osh_ALT4 PS4 is scoped

[osh_ALT stderr] Expected '+ echo one\n+ f\n- echo func\n+ echo two\n', got "+ echo one\n+ f\n+ 'TODO: trace string for assignment'\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
+ 'TODO: trace string for assignment'
- echo func
+ echo two
dash5 xtrace with variables in PS4

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

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

[osh stderr] Expected '+1:echo one\n+2:echo two\n', got '+1:(lvalue.Named name:x spids:[11]) = (value.Str s:1)\n+1:echo one\n+2:(lvalue.Named name:x spids:[21]) = (value.Str s:2)\n+2:echo two\n'

stdout:
one
two
stderr:
+1:(lvalue.Named name:x spids:[11]) = (value.Str s:1)
+1:echo one
+2:(lvalue.Named name:x spids:[21]) = (value.Str s:2)
+2:echo two
osh_ALT5 xtrace with variables in PS4

[osh_ALT stderr] Expected '+1:echo one\n+2:echo two\n', got '+1:(lvalue.Named name:x spids:[11]) = (value.Str s:1)\n+1:echo one\n+2:(lvalue.Named name:x spids:[21]) = (value.Str s:2)\n+2:echo two\n'

stdout:
one
two
stderr:
+1:(lvalue.Named name:x spids:[11]) = (value.Str s:1)
+1:echo one
+2:(lvalue.Named name:x spids:[21]) = (value.Str s:2)
+2:echo two
dash6 PS4 with unterminated ${

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: Syntax error: Missing '}'
mksh6 PS4 with unterminated ${

stdout:
stderr: 
/bin/mksh: no closing quote
dash7 PS4 with unterminated $(

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: Syntax error: end of file unexpected (expecting ")")
mksh7 PS4 with unterminated $(

stdout:
stderr: 
/bin/mksh: syntax error: '(' unmatched
dash8 PS4 with runtime error

stdout:
stderr: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 4: arithmetic expression: division by zero: " 1 / 0 "
mksh8 PS4 with runtime error

stdout:
stderr: 
/bin/mksh: <stdin>[4]:  1 / 0 : zero divisor