Results for dbracket.test.sh

casebashmkshoshosh_ALTdescription
0pass pass pass pass [[ glob matching, [[ has no glob expansion
1pass pass pass pass [[ glob matching with escapes
2pass pass pass pass equality
3pass pass pass pass [[ glob matching with unquoted var
4pass N-I pass pass [[ regex matching
details
5pass N-I pass pass [[ regex syntax error
details
6pass pass pass pass [[ has no word splitting
7pass pass pass pass [[ has quote joining
8pass pass pass pass [[ empty string is false
9pass pass pass pass && chain
10pass pass pass pass || chain
11pass pass pass pass [[ compound expressions
12pass pass pass pass precedence of && and || inside [[
13pass pass pass pass precedence of && and || in a command context
14pass N-I pass pass Octal literals with -eq
details
15pass N-I pass pass Hex literals with -eq
details
16pass pass pass pass > on strings
17pass pass pass pass != on strings
18ok ok pass pass -eq on strings
detailsdetails
19pass pass pass pass [[ compare with literal -f (compare with test-builtin.test.sh)
20pass ok pass pass [[ with op variable (compare with test-builtin.test.sh)
details
21pass pass pass pass [[ with unquoted empty var (compare with test-builtin.test.sh)
22pass pass pass pass [[ at runtime doesn't work
23pass pass pass pass [[ with env prefix doesn't work
24pass pass pass pass [[ over multiple lines is OK
25pass pass pass pass Argument that looks like a command word operator
26pass ok FAIL FAIL Argument that looks like a real operator
detailsdetailsdetails
27pass pass pass pass Does user array equal "$@" ?
28pass pass pass pass Array coerces to string
29pass pass pass pass Quotes don't matter in comparison
30pass pass FAIL FAIL -eq with arithmetic expression!
detailsdetails
31pass pass pass pass -eq coercion produces weird results
32pass pass pass pass [[ '(' ]] is treated as literal
33pass ok pass pass [[ '(' foo ]] is syntax error
details
34pass pass pass pass empty ! is treated as literal
35pass ok pass pass [[ -z ]] is syntax error
details
36pass pass pass pass [[ -z '>' ]]
37pass ok pass pass [[ -z '>' a ]] is syntax error
details
38pass pass pass pass test whether ']]' is empty
39pass ok pass pass [[ ]] is syntax error
details
40pass ok pass pass [[ && ]] is syntax error
details

147 passed, 9 ok, 4 known unimplemented, 0 known bugs, 2 failed, 0 skipped

Details on runs that didn't PASS

mksh4 [[ regex matching

stdout:
stderr: 
/bin/mksh: <stdin>[2]: syntax error: '=~' unexpected operator/operand
mksh5 [[ regex syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '=~' unexpected operator/operand
mksh14 Octal literals with -eq

stdout:
false
stderr:
mksh15 Hex literals with -eq

stdout:
false
stderr:
/bin/mksh: <stdin>[3]: 0x0f: bad number '0x0f'
bash18 -eq on strings

stdout:
true
true
stderr:
mksh18 -eq on strings

stdout:
true
true
stderr:
mksh20 [[ with op variable (compare with test-builtin.test.sh)

stdout:
stderr: 
/bin/mksh: <stdin>[2]: syntax error: '$op' unexpected operator/operand
mksh26 Argument that looks like a real operator

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '-f' missing argument
osh26 Argument that looks like a real operator

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 504, in <module>
    main(sys.argv)
  File "bin/osh", line 487, in main
    sys.exit(OilMain(argv))
  File "bin/osh", line 470, in OilMain
    status = OshMain(main_argv, login_shell)
  File "bin/osh", line 409, in OshMain
    status = ex.ExecuteAndRunExitTrap(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap
    status = self.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 750, in _Dispatch
    result = self.bool_ev.Eval(node.expr)
  File "/home/andy/git/oilshell/oil/bin/../core/expr_eval.py", line 478, in Eval
    s = self._EvalCompoundWord(node.child)
  File "/home/andy/git/oilshell/oil/bin/../core/expr_eval.py", line 449, in _EvalCompoundWord
    val = self.word_ev.EvalWordToString(word, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 724, in EvalWordToString
    for part in word.parts:
AttributeError: 'TokenWord' object has no attribute 'parts'
osh_ALT26 Argument that looks like a real operator

[osh_ALT status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/home/andy/git/oilshell/oil/Python-2.7.13/Lib/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 504, in <module>
    main(sys.argv)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 487, in main
    sys.exit(OilMain(argv))
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 470, in OilMain
    status = OshMain(main_argv, login_shell)
  File "/home/andy/git/oilshell/oil/bin/oil.py", line 409, in OshMain
    status = ex.ExecuteAndRunExitTrap(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1210, in ExecuteAndRunExitTrap
    status = self.Execute(node)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1192, in Execute
    status = self._Execute(node, fork_external=fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 882, in _Dispatch
    status = self._ExecuteList(node.children)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1166, in _ExecuteList
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 1145, in _Execute
    status, check_errexit = self._Dispatch(node, fork_external)
  File "/home/andy/git/oilshell/oil/bin/../core/cmd_exec.py", line 750, in _Dispatch
    result = self.bool_ev.Eval(node.expr)
  File "/home/andy/git/oilshell/oil/bin/../core/expr_eval.py", line 478, in Eval
    s = self._EvalCompoundWord(node.child)
  File "/home/andy/git/oilshell/oil/bin/../core/expr_eval.py", line 449, in _EvalCompoundWord
    val = self.word_ev.EvalWordToString(word, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oilshell/oil/bin/../core/word_eval.py", line 724, in EvalWordToString
    for part in word.parts:
AttributeError: 'TokenWord' object has no attribute 'parts'
FATAL: couldn't import from app bundle '_bin/osh' (1)
Stripping the oil.ovm binary may cause this error.
See https://github.com/oilshell/oil/issues/47
osh30 -eq with arithmetic expression!

[osh stdout] Expected u'true\ntrue\n', got ''
[osh status] Expected 0, got 1

stdout:
stderr: 
osh warning: Invalid integer constant '1+2'
osh warning: Invalid integer constant '1+2'
osh_ALT30 -eq with arithmetic expression!

[osh_ALT stdout] Expected u'true\ntrue\n', got ''
[osh_ALT status] Expected 0, got 1

stdout:
stderr: 
osh warning: Invalid integer constant '1+2'
osh warning: Invalid integer constant '1+2'
mksh33 [[ '(' foo ]] is syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: 'foo' unexpected operator/operand
mksh35 [[ -z ]] is syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[2]: syntax error: 'echo' unexpected operator/operand
mksh37 [[ -z '>' a ]] is syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '--' unexpected operator/operand
mksh39 [[ ]] is syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: 'newline' unexpected operator/operand
mksh40 [[ && ]] is syntax error

stdout:
stderr: 
/bin/mksh: <stdin>[1]: syntax error: '&&' expression expected