Results for xtrace.test.sh

statusdashbashmkshosh
pass 2734
ok 5260
N-I 1000
BUG 1000
FAIL 0005
total9999
casedashbashmkshoshdescription
0pass ok pass FAIL set -o verbose prints unevaluated code
detailsdetails
1BUG pass pass FAIL xtrace with whitespace and quotes
detailsdetails
2N-I ok pass FAIL CASE: xtrace with newlines
detailsdetailsdetails
3pass pass ok pass xtrace written before command executes
details
4ok pass ok FAIL PS4 is scoped
detailsdetailsdetails
5ok pass ok FAIL xtrace with variables in PS4
detailsdetailsdetails
6ok pass ok pass PS4 with unterminated ${
detailsdetails
7ok pass ok pass PS4 with unterminated $(
detailsdetails
8ok pass ok pass PS4 with runtime error
detailsdetails
16 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
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' "'" '"'
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]'
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: assignment builtin'\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
+ 'TODO: assignment builtin'
- 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
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: 
/home/andy/git/oilshell/oil/_tmp/spec-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: 
/home/andy/git/oilshell/oil/_tmp/spec-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: 
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[4]:  1 / 0 : zero divisor