Results for builtin-bracket.test.sh

statusdashbashmkshosh
pass 32373538
ok 2020
N-I 3000
BUG 1110
total38383838
casedashbashmkshoshdescription
0pass pass pass pass zero args: [ ]
1pass pass pass pass one arg: [ x ] where x is one of '=' '!' '(' ']'
2pass pass pass pass one arg: empty string is false. Equivalent to -n.
3N-I pass pass pass -a as unary operator (alias of -e)
details
4pass pass pass pass two args: -z with = ! ( ]
5pass pass pass pass three args
6pass pass pass pass four args
7pass pass pass pass test with extra args is syntax error
8pass pass pass pass ] syntax errors
9pass pass pass pass -n
10pass pass pass pass ! -a
11pass pass pass pass -o
12pass pass pass pass ( )
13pass pass pass pass ( ) ! -a -o with system version of [
14BUG pass pass pass == is alias for =
details
15N-I pass pass pass == and = does not do glob
details
16pass pass pass pass [ with op variable
17pass pass pass pass [ with unquoted empty var
18pass pass pass pass [ compare with literal -f
19pass pass pass pass [ '(' foo ] is runtime syntax error
20pass pass pass pass -z '>' implies two token lookahead
21ok pass ok pass operator/operand ambiguity with ]
detailsdetails
22ok pass ok pass operator/operand ambiguity with -a
detailsdetails
23pass pass pass pass -d
24pass pass pass pass -x
25pass pass pass pass -r
26pass pass pass pass -w
27pass pass pass pass -h and -L test for symlink
28pass pass pass pass -t 1 for stdout
29pass BUG pass pass [ -t invalid ]
details
30pass pass pass pass -ot and -nt
31pass pass BUG pass [ a -eq b ]
details
32pass pass pass pass test -s
33pass pass pass pass test -b -c -S (block, character, socket)
34pass pass pass pass test -p named pipe
35pass pass pass pass -G and -O for effective user ID and group ID
36N-I pass pass pass test -o for options
details
37pass pass pass pass -nt -ot
142 passed, 4 OK, 3 not implemented, 3 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

dash3 -a as unary operator (alias of -e)

stdout:
status=2
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: [: -a: unexpected operator
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: [: -a: unexpected operator
dash14 == is alias for =

stdout:
true
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 2: [: a: unexpected operator
dash15 == and = does not do glob

stdout:
status=1
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 3: [: abc: unexpected operator
dash21 operator/operand ambiguity with ]

stdout:
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: [: -a: unexpected operator
mksh21 operator/operand ambiguity with ]

stdout:
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: [: ]: unexpected operator/operand
dash22 operator/operand ambiguity with -a

stdout:
status=1
stderr:
mksh22 operator/operand ambiguity with -a

stdout:
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/mksh: <stdin>[1]: [: expression expected
bash29 [ -t invalid ]

stdout:
status=1
stderr:
mksh31 [ a -eq b ]

stdout:
status=0
stderr:
dash36 test -o for options

stdout:
status=2
status=0
status=2
stderr:
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 1: test: -o: unexpected operator
/home/andy/git/oilshell/oil/_tmp/spec-bin/dash: 5: test: -o: unexpected operator