Results for xtrace.test.sh

statusbashdashmkshosh
pass 114715
ok 7683
N-I 0730
BUG 1210
FAIL 0001
total19191919
casebashdashmkshoshdescription
0pass BUG pass pass unset PS4
details
1ok pass pass FAIL set -o verbose prints unevaluated code
detailsdetails
2ok N-I BUG pass xtrace with unprintable chars
detailsdetailsdetails
3pass N-I pass pass xtrace with unicode chars
details
4pass pass pass pass xtrace with paths
5BUG N-I pass pass xtrace with tabs
detailsdetails
6ok BUG ok pass xtrace with whitespace, quotes, and backslash
detailsdetailsdetails
7ok N-I pass pass xtrace with newlines
detailsdetails
8pass pass ok pass xtrace written before command executes
details
9ok ok ok pass Assignments and assign builtins
detailsdetailsdetails
10ok N-I N-I pass [[ ]]
detailsdetailsdetails
11pass ok ok ok PS4 is scoped
detailsdetailsdetails
12pass ok ok ok xtrace with variables in PS4
detailsdetailsdetails
13pass ok ok pass PS4 with unterminated ${
detailsdetails
14pass ok ok pass PS4 with unterminated $(
detailsdetails
15pass ok ok pass PS4 with runtime error
detailsdetails
16pass pass pass ok Reading $? in PS4
details
17ok N-I N-I pass Regression: xtrace for "declare -a a+=(v)"
detailsdetailsdetails
18pass N-I N-I pass Regression: xtrace for "a+=(v)"
detailsdetails
37 passed, 24 OK, 10 not implemented, 4 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

dash0 unset PS4

stdout:
weird bug
stderr:
bash1 set -o verbose prints unevaluated code

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

[osh stdout] Expected 'foo\nbar\n', got 'foo\n'
[osh stderr] Expected 'x=foo\ny=bar\necho $x\necho $(echo $y)\n', got 'osh warning: set -o verbose not implemented\nTraceback (most recent call last):\n File "/home/uke/oil/bin/oils_for_unix.py", line 202, in <module>\n sys.exit(main(sys.argv))\n File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main\n return AppBundleMain(argv)\n File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain\n return shell.Main(\'osh\', arg_r, environ, login_shell, loader, readline)\n File "/home/uke/oil/core/shell.py", line 1253, in Main\n cmd_flags=cmd_eval.IsMainProgram)\n File "/home/uke/oil/core/main_loop.py", line 336, in Batch\n was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)\n File "/home/uke/oil/core/main_loop.py", line 401, in Batch2\n is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)\n File "/home/uke/oil/osh/cmd_eval.py", line 2175, in ExecuteAndCatch\n status = self._Execute(node)\n File "/home/uke/oil/osh/cmd_eval.py", line 1974, in _Execute\n status = self._Dispatch(node, cmd_st)\n File "/home/uke/oil/osh/cmd_eval.py", line 1701, in _Dispatch\n status = self._DoSimple(node, cmd_st)\n File "/home/uke/oil/osh/cmd_eval.py", line 904, in _DoSimple\n allow_assign=True)\n File "/home/uke/oil/osh/word_eval.py", line 2541, in EvalWordSequence2\n self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)\n File "/home/uke/oil/osh/word_eval.py", line 1989, in _EvalWordToParts\n self._EvalWordPart(p, word_part_vals, eval_flags)\n File "/home/uke/oil/osh/word_eval.py", line 1881, in _EvalWordPart\n quoted) # type: part_value_t\n File "/home/uke/oil/osh/word_eval.py", line 2629, in _EvalCommandSub\n stdout_str = self.shell_ex.RunCommandSub(cs_part)\n File "/home/uke/oil/core/executor.py", line 691, in RunCommandSub\n status, stdout_str, stderr_str = self.CaptureStdout(node)\n File "/home/uke/oil/core/executor.py", line 619, in CaptureStdout\n fds, w, exc = select.select([r,r2], [], [r,r2], -1)\nNameError: global name \'select\' is not defined\n'
[osh status] Expected 0, got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
foo
stderr:
osh warning: set -o verbose not implemented
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 202, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 171, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 141, in AppBundleMain
    return shell.Main('osh', arg_r, environ, login_shell, loader, readline)
  File "/home/uke/oil/core/shell.py", line 1253, in Main
    cmd_flags=cmd_eval.IsMainProgram)
  File "/home/uke/oil/core/main_loop.py", line 336, in Batch
    was_parsed, status = Batch2(cmd_ev, c_parser, errfmt, cmd_flags=cmd_flags)
  File "/home/uke/oil/core/main_loop.py", line 401, in Batch2
    is_return, is_fatal = cmd_ev.ExecuteAndCatch(node, cmd_flags)
  File "/home/uke/oil/osh/cmd_eval.py", line 2175, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 1974, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1701, in _Dispatch
    status = self._DoSimple(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 904, in _DoSimple
    allow_assign=True)
  File "/home/uke/oil/osh/word_eval.py", line 2541, in EvalWordSequence2
    self._EvalWordToParts(w, part_vals, EXTGLOB_FILES)
  File "/home/uke/oil/osh/word_eval.py", line 1989, in _EvalWordToParts
    self._EvalWordPart(p, word_part_vals, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 1881, in _EvalWordPart
    quoted)  # type: part_value_t
  File "/home/uke/oil/osh/word_eval.py", line 2629, in _EvalCommandSub
    stdout_str = self.shell_ex.RunCommandSub(cs_part)
  File "/home/uke/oil/core/executor.py", line 691, in RunCommandSub
    status, stdout_str, stderr_str = self.CaptureStdout(node)
  File "/home/uke/oil/core/executor.py", line 619, in CaptureStdout
    fds, w, exc = select.select([r,r2], [], [r,r2], -1)
NameError: global name 'select' is not defined
bash2 xtrace with unprintable chars

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

stdout:
stderr: 
mksh2 xtrace with unprintable chars

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

stdout:
stderr: 
bash5 xtrace with tabs

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

stdout:
stderr: 
bash6 xtrace with whitespace, quotes, and backslash

stdout:
1 2 ' " \
stderr:
+ echo '1 2' \' '"' '\'
dash6 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' \' '"' '\'
bash7 xtrace with newlines

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

stdout:
$[
]
stderr:
+ echo $[\n]
mksh8 xtrace written before command executes

stdout:
stderr: 
+ >&2 
+ echo one
one
+ >&2 
+ echo two
two
bash9 Assignments and assign builtins

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

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

stdout:
2
stderr:
+ x=1 x=2 
+ echo 2
+ readonly 'x=3'
bash10 [[ ]]

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

stdout:
stderr: 
mksh10 [[ ]]

stdout:
stderr: 
dash11 PS4 is scoped

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

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

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

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

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

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

stdout:
stderr: 
dash: 1: Syntax error: Missing '}'
mksh13 PS4 with unterminated ${

stdout:
stderr: 
mksh: no closing quote
dash14 PS4 with unterminated $(

stdout:
stderr: 
dash: 1: Syntax error: end of file unexpected (expecting ")")
mksh14 PS4 with unterminated $(

stdout:
stderr: 
mksh: syntax error: '(' unmatched
dash15 PS4 with runtime error

stdout:
stderr: 
dash: 4: arithmetic expression: division by zero: " 1 / 0 "
mksh15 PS4 with runtime error

stdout:
stderr: 
mksh: <stdin>[4]:  1 / 0 : zero divisor
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
dash17 Regression: xtrace for "declare -a a+=(v)"

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

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

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

stdout:
stderr: