Results for xtrace.test.sh

casedashbashmkshoshosh_ALTosh-byterundescription
0pass ok pass FAIL FAIL FAIL set -o verbose prints unevaluated code
detailsdetailsdetailsdetails
1BUG pass pass FAIL FAIL FAIL xtrace with whitespace and quotes
detailsdetailsdetailsdetails
2N-I ok pass FAIL FAIL FAIL CASE: xtrace with newlines
detailsdetailsdetailsdetailsdetails
3pass pass ok pass pass pass xtrace written before command executes
details
4ok pass ok FAIL FAIL FAIL PS4 is scoped
detailsdetailsdetailsdetailsdetails
5ok pass ok FAIL FAIL FAIL xtrace with variables in PS4
detailsdetailsdetailsdetailsdetails
6ok pass ok pass pass pass PS4 with unterminated ${
detailsdetails
7ok pass ok pass pass pass PS4 with unterminated $(
detailsdetails

20 passed, 11 ok, 1 known unimplemented, 1 known bugs, 5 failed, 0 skipped

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
osh-byterun0 set -o verbose prints unevaluated code

[osh-byterun 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' "'" '"'
osh-byterun1 xtrace with whitespace and quotes

[osh-byterun 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]'
osh-byterun2 CASE: xtrace with newlines

[osh-byterun 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- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')
- 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- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')
- echo func
+ echo two
osh-byterun4 PS4 is scoped

[osh-byterun stderr] Expected '+ echo one\n+ f\n- echo func\n+ echo two\n', got "+ echo one\n+ f\n- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')\n- echo func\n+ echo two\n"

stdout:
one
func
two
stderr:
+ echo one
+ f
- (lvalue.LhsName name:PS4 spids:[18]) = (value.Str s:'- ')
- 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.LhsName name:x spids:[11]) = (value.Str s:1)\n+1:echo one\n+2:(lvalue.LhsName name:x spids:[18]) = (value.Str s:2)\n+2:echo two\n'

stdout:
one
two
stderr:
+1:(lvalue.LhsName name:x spids:[11]) = (value.Str s:1)
+1:echo one
+2:(lvalue.LhsName name:x spids:[18]) = (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.LhsName name:x spids:[11]) = (value.Str s:1)\n+1:echo one\n+2:(lvalue.LhsName name:x spids:[18]) = (value.Str s:2)\n+2:echo two\n'

stdout:
one
two
stderr:
+1:(lvalue.LhsName name:x spids:[11]) = (value.Str s:1)
+1:echo one
+2:(lvalue.LhsName name:x spids:[18]) = (value.Str s:2)
+2:echo two
osh-byterun5 xtrace with variables in PS4

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

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

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

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

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

stdout:
stderr: 
_tmp/spec-bin/mksh: syntax error: '(' unmatched