Results for dbracket.test.sh

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

84 passed, 4 ok, 4 known unimplemented, 0 known bugs, 7 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
osh13 precedence of && and || in a command context

[osh stdout] Expected b'NO precedence\n', got b'YES\n'

stdout:
YES
stderr:
mksh14 Octal literals with -eq

stdout:
false
stderr:
osh14 Octal literals with -eq

[osh stdout] Expected b'true\nfalse\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 979, in _Execute
    status = self._Execute(left)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 923, in _Execute
    raise AssertionError('Error evaluating boolean: %s' % bool_ev.Error())
AssertionError: Error evaluating boolean: ["Invalid integer: invalid literal for int() with base 10: 'ZZZ017'"]
mksh15 Hex literals with -eq

stdout:
false
stderr:
/bin/mksh: <stdin>[3]: 0x0f: bad number '0x0f'
osh15 Hex literals with -eq

[osh stdout] Expected b'true\nfalse\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 979, in _Execute
    status = self._Execute(left)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 923, in _Execute
    raise AssertionError('Error evaluating boolean: %s' % bool_ev.Error())
AssertionError: Error evaluating boolean: ["Invalid integer: invalid literal for int() with base 10: '0x0f'"]
bash18 -eq on strings

stdout:
true
true
stderr:
mksh18 -eq on strings

stdout:
true
true
stderr:
osh18 -eq on strings

[osh stdout] Expected b'true\ntrue\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 979, in _Execute
    status = self._Execute(left)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 923, in _Execute
    raise AssertionError('Error evaluating boolean: %s' % bool_ev.Error())
AssertionError: Error evaluating boolean: ["Invalid integer: invalid literal for int() with base 10: 'a'"]
mksh21 [[ with op variable

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

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

[osh status] Expected 2, got 1

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 919, in _Execute
    ok = bool_ev.Eval(node.expr)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 284, in _Eval
    s = self._EvalCompoundWord(node.child)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 252, in _EvalCompoundWord
    ok, val = self.word_ev.EvalWordToString(word, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 903, in EvalWordToString
    for part in word.parts:
AttributeError: 'TokenWord' object has no attribute 'parts'
osh30 Does user array equal "$@" ?

[osh stdout] Expected b'true\nfalse\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 979, in _Execute
    status = self._Execute(left)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 919, in _Execute
    ok = bool_ev.Eval(node.expr)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 313, in _Eval
    s1 = self._EvalCompoundWord(node.left)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 252, in _EvalCompoundWord
    ok, val = self.word_ev.EvalWordToString(word, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 907, in EvalWordToString
    self._AddErrorContext("Only string parts are allowed", word=word)
TypeError: _AddErrorContext() got an unexpected keyword argument 'word'
osh31 Array coerces to string

[osh stdout] Expected b'true\nfalse\n', got b''

stdout:
stderr: 
Traceback (most recent call last):
  File "bin/osh", line 388, in <module>
    sys.exit(main(sys.argv))
  File "bin/osh", line 378, in main
    return OshMain(main_argv)
  File "bin/osh", line 337, in OshMain
    status = ex.Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 1111, in Execute
    status = self._Execute(node)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 974, in _Execute
    status = self._Execute(child)  # last status wins
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 979, in _Execute
    status = self._Execute(left)
  File "/home/andy/git/oil2/bin/../core/cmd_exec.py", line 919, in _Execute
    ok = bool_ev.Eval(node.expr)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 64, in Eval
    result = self._Eval(node)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 317, in _Eval
    s2 = self._EvalCompoundWord(node.right, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oil2/bin/../core/expr_eval.py", line 252, in _EvalCompoundWord
    ok, val = self.word_ev.EvalWordToString(word, do_fnmatch=do_fnmatch)
  File "/home/andy/git/oil2/bin/../core/word_eval.py", line 907, in EvalWordToString
    self._AddErrorContext("Only string parts are allowed", word=word)
TypeError: _AddErrorContext() got an unexpected keyword argument 'word'