Results for dbracket.test.sh

statusoshosh-cpp
pass 4848
FAIL 22
total5050
caseoshosh-cppdescription
0pass pass [[ glob matching, [[ has no glob expansion
1pass pass [[ glob matching with escapes
2pass pass equality
3pass pass [[ glob matching with unquoted var
4pass pass [[ regex matching
5pass pass [[ regex syntax error
6pass pass [[ has no word splitting
7pass pass [[ has quote joining
8pass pass [[ empty string is false
9pass pass && chain
10pass pass || chain
11pass pass [[ compound expressions
12pass pass precedence of && and || inside [[
13pass pass precedence of && and || in a command context
14pass pass Octal literals with -eq
15pass pass Hex literals with -eq
16pass pass > on strings
17pass pass != on strings
18pass pass -eq on strings
19pass pass [[ compare with literal -f (compare with test-builtin.test.sh)
20pass pass [[ with op variable (compare with test-builtin.test.sh)
21pass pass [[ with unquoted empty var (compare with test-builtin.test.sh)
22pass pass [[ at runtime doesn't work
23pass pass [[ with env prefix doesn't work
24pass pass [[ over multiple lines is OK
25FAIL FAIL Argument that looks like a command word operator
detailsdetails
26pass pass Argument that looks like a real operator
27pass pass User array compared to "$@" (broken unless shopt -s strict_array)
28pass pass Array coerces to string (shopt -s strict_array to disallow)
29pass pass (( array1 == array2 )) doesn't work
30pass pass Quotes don't matter in comparison
31pass pass -eq does dynamic arithmetic parsing (not supported in OSH)
32pass pass -eq coercion produces weird results
33pass pass [[ '(' ]] is treated as literal
34pass pass [[ '(' foo ]] is syntax error
35pass pass empty ! is treated as literal
36pass pass [[ -z ]] is syntax error
37pass pass [[ -z '>' ]]
38pass pass [[ -z '>' a ]] is syntax error
39pass pass test whether ']]' is empty
40pass pass [[ ]] is syntax error
41FAIL FAIL [[ && ]] is syntax error
detailsdetails
42pass pass [[ a 3< b ]] doesn't work (bug regression)
43pass pass tilde expansion in [[
44pass pass more tilde expansion
45pass pass tilde expansion with =~ (confusing)
46pass pass [[ ]] with redirect
47pass pass special chars
48pass pass \(\) in pattern (regression)
49pass pass negative numbers - zero, decimal, octal, hex, base N
96 passed, 0 OK, 0 not implemented, 0 BUG, 2 failed, 0 timeouts, 0 cases skipped
2 failed under osh

Details on runs that didn't PASS

osh25 Argument that looks like a command word operator

[osh stdout] Expected 'false\nfalse\n' Got 'false\n'
[osh status] Expected 0 Got 2

stdout:
false
stderr:
  [[ -f == ]] || echo false
                      ^~~~~
[ stdin ]:2: Expected ]]
osh-cpp25 Argument that looks like a command word operator

[osh-cpp stdout] Expected 'false\nfalse\n' Got 'false\n'
[osh-cpp status] Expected 0 Got 2

stdout:
false
stderr:
  [[ -f == ]] || echo false
                      ^~~~~
[ stdin ]:2: Expected ]]
osh41 [[ && ]] is syntax error

[osh status] Expected 2 Got 1
[osh stderr] Found 'Traceback (most recent'

stdout:
stderr: 
Traceback (most recent call last):
  File "/home/uke/oil/bin/oils_for_unix.py", line 263, in <module>
    sys.exit(main(sys.argv))
  File "/home/uke/oil/bin/oils_for_unix.py", line 232, in main
    return AppBundleMain(argv)
  File "/home/uke/oil/bin/oils_for_unix.py", line 198, in AppBundleMain
    bash_compat=(applet == 'bash'))
  File "/home/uke/oil/core/shell.py", line 1296, 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 2365, in ExecuteAndCatch
    status = self._Execute(node)
  File "/home/uke/oil/osh/cmd_eval.py", line 2164, in _Execute
    status = self._Dispatch(node, cmd_st)
  File "/home/uke/oil/osh/cmd_eval.py", line 1923, in _Dispatch
    result = self.bool_ev.EvalB(node.expr)
  File "/home/uke/oil/osh/sh_expr_eval.py", line 1151, in EvalB
    s = self._EvalCompoundWord(node.w)
  File "/home/uke/oil/osh/sh_expr_eval.py", line 1141, in _EvalCompoundWord
    val = self.word_ev.EvalWordToString(word, eval_flags)
  File "/home/uke/oil/osh/word_eval.py", line 2091, in EvalWordToString
    assert UP_w.tag() == word_e.Compound, UP_w
AssertionError: (Token
  id:Op_DAmp
  length:2
  col:3
  line:(SourceLine
    line_num:1
    content:"[[ && ]]\n"
    src:(source.Stdin comment:"")
  )
)

osh-cpp41 [[ && ]] is syntax error

[osh-cpp status] Expected 2 Got -6

stdout:
stderr: 
osh: _gen/bin/oils_for_unix.mycpp.cc:47094: void word_eval::AbstractWordEvaluator::_EvalWordPart(syntax_asdl::word_part_t*, List<runtime_asdl::part_value_t*>*, int): Assertion `0' failed.
timeout: the monitored command dumped core