Results for builtin-bracket.test.sh

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

Details on runs that didn't PASS

osh_.cc3 -a as unary operator (alias of -e)

[osh_.cc stdout] Expected 'status=0\nstatus=1\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.cc5 three args

[osh_.cc stdout] Expected 'status=1\nstatus=1\nstatus=0\nstatus=0\nstatus=0\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.cc7 test with extra args is syntax error

[osh_.cc stdout] Expected 'status=2\nstatus=2\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.cc10 ! -a

[osh_.cc stdout] Expected 'status=0\n', got 'status=2\n'

stdout:
status=2
stderr:
  [ -z '' -a ! -z x ]
             ^
[ stdin ]:1: (test) Unexpected token in boolean expression
osh_.cc11 -o

[osh_.cc stdout] Expected 'status=0\n', got 'status=2\n'

stdout:
status=2
stderr:
  [ -z x -o ! -z x ]
            ^
[ stdin ]:1: (test) Unexpected token in boolean expression
osh_.cc12 ( )

[osh_.cc stdout] Expected 'status=0\n', got 'status=2\n'

stdout:
status=2
stderr:
  [ -z '' -a '(' ! -z x ')' ]
             ^
[ stdin ]:1: (test) Unexpected token in boolean expression
osh_.cc13 ( ) ! -a -o with system version of [

[osh_.cc stdout] Expected 'true\n', got ''
[osh_.cc status] Expected 0, got 2

stdout:
stderr: 
  command [ --version
          ^
[ stdin ]:1: missing closing ]
  command [ -z '' -a '(' ! -z x ')' ] && echo true
                     ^
[ stdin ]:2: (test) Unexpected token in boolean expression
osh_.cc17 [ with unquoted empty var

[osh_.cc status] Expected 2, got -4

stdout:
stderr: 
osh_.cc19 [ '(' foo ] is runtime syntax error

[osh_.cc stdout] Expected 'status=2\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.cc20 -z '>' implies two token lookahead

[osh_.cc stdout] Expected 'true\nfalse\ntrue\n', got 'true\nfalse\n'
[osh_.cc status] Expected 0, got 1

stdout:
true
false
stderr:
osh_.cc21 operator/operand ambiguity with ]

[osh_.cc stdout] Expected 'status=0\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.cc22 operator/operand ambiguity with -a

[osh_.cc stdout] Expected 'status=0\n', got ''
[osh_.cc status] Expected 0, got -4

stdout:
stderr: 
osh_.cc23 -d

[osh_.cc stdout] Expected 'status=0\nstatus=1\n', got 'status=0\n'
[osh_.cc status] Expected 0, got -6

stdout:
status=0
stderr:
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py24 -x

[osh_.py stdout] Expected 'no\nyes\nbad\n', got "(cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4])\necho hi\nno\n(cmd_value.Argv argv:[chmod '+x' '/x'] arg_spids:[33 35 38])\nbad\n"

stdout:
(cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4])
echo hi
no
(cmd_value.Argv argv:[chmod '+x' '/x'] arg_spids:[33 35 38])
bad
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc24 -x

[osh_.cc stdout] Expected 'no\nyes\nbad\n', got "(cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4])\necho hi\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[rm -f '/x'] arg_spids:[0 2 4])
echo hi
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py25 -r

[osh_.py stdout] Expected 'yes\nno\n', got "1\n2\n(cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])\nno\n"

stdout:
1
2
(cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])
no
stderr:
Unhandled SimpleCommand
osh_.cc25 -r

[osh_.cc stdout] Expected 'yes\nno\n', got "1\n2\n(cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])\n"
[osh_.cc status] Expected 0, got -6

stdout:
1
2
(cmd_value.Argv argv:[chmod -r '/testr_no'] arg_spids:[22 24 26])
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py26 -w

[osh_.py stdout] Expected 'yes\nno\n', got "(cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4])\n1\n2\n(cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])\nno\n"

stdout:
(cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4])
1
2
(cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])
no
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc26 -w

[osh_.cc stdout] Expected 'yes\nno\n', got "(cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4])\n1\n2\n(cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[rm -f '/testw_*'] arg_spids:[0 2 4])
1
2
(cmd_value.Argv argv:[chmod -w '/testw_no'] arg_spids:[30 32 34])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.cc27 -k for sticky bit

[osh_.cc stdout] Expected 'status=0\nstatus=1\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py28 -h and -L test for symlink

[osh_.py stdout] Expected 'no\nno\nis-file\nsymlink\nsymlink\ndangling\ndangling\ndangling is not file\n', got "(cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8])\n(cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12])\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink']\n arg_spids: [15 17 19 21 24]\n)\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling']\n arg_spids: [27 29 31 33 36]\n)\nno\nno\ndangling is not file\n"

stdout:
(cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8])
(cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12])
(cmd_value.Argv
  argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink']
  arg_spids: [15 17 19 21 24]
)
(cmd_value.Argv
  argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling']
  arg_spids: [27 29 31 33 36]
)
no
no
dangling is not file
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc28 -h and -L test for symlink

[osh_.cc stdout] Expected 'no\nno\nis-file\nsymlink\nsymlink\ndangling\ndangling\ndangling is not file\n', got "(cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8])\n(cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12])\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink']\n arg_spids: [15 17 19 21 24]\n)\n(cmd_value.Argv\n argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling']\n arg_spids: [27 29 31 33 36]\n)\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[mkdir -p '/builtin-test-1'] arg_spids:[4 6 8])
(cmd_value.Argv argv:[touch '/builtin-test-1/zz'] arg_spids:[10 12])
(cmd_value.Argv
  argv: [ln -s -f '/builtin-test-1/zz' '/builtin-test-1/symlink']
  arg_spids: [15 17 19 21 24]
)
(cmd_value.Argv
  argv: [ln -s -f '/builtin-test-1/__nonexistent_ZZ__' '/builtin-test-1/dangling']
  arg_spids: [27 29 31 33 36]
)
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.cc29 -t 1 for stdout

[osh_.cc stdout] Expected 'status=1\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:14: bool bool_stat::isatty(int, Str *, syntax_asdl::word_t *): Assertion `0' failed.
osh_.py31 -ot and -nt

[osh_.py stdout] Expected 'older\nnot newer\nnot older than itself\nnot newer than itself\n', got "(cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6])\n(cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])\nnot newer\nnot older than itself\nnot newer than itself\n"

stdout:
(cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6])
(cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])
not newer
not older than itself
not newer than itself
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc31 -ot and -nt

[osh_.cc stdout] Expected 'older\nnot newer\nnot older than itself\nnot newer than itself\n', got "(cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6])\n(cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[touch -d '2017/12/31' '/x'] arg_spids:[0 2 4 6])
(cmd_value.Argv argv:[touch -d '2018/01/01'] arg_spids:[9 11 13])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed.
osh_.py33 test -s

[osh_.py stdout] Expected 'status=1\nstatus=1\nstatus=0\n', got "status=1\n(cmd_value.Argv argv:[touch '/empty'] arg_spids:[11 13])\nstatus=1\nnonempty\nstatus=1\n"

stdout:
status=1
(cmd_value.Argv argv:[touch '/empty'] arg_spids:[11 13])
status=1
nonempty
status=1
stderr:
Unhandled SimpleCommand
osh_.cc33 test -s

[osh_.cc stdout] Expected 'status=1\nstatus=1\nstatus=0\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.cc34 test -b -c -S (block, character, socket)

[osh_.cc stdout] Expected '-b\nstatus=1\nstatus=1\n-c\nstatus=1\nstatus=1\n-S\nstatus=1\nstatus=1\n', got '-b\n'
[osh_.cc status] Expected 0, got -6

stdout:
-b
stderr:
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py35 test -p named pipe

[osh_.py stdout] Expected 'status=0\nstatus=1\n', got "(cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])\nstatus=1\nstatus=1\n"

stdout:
(cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])
status=1
status=1
stderr:
Unhandled SimpleCommand
osh_.cc35 test -p named pipe

[osh_.cc stdout] Expected 'status=0\nstatus=1\n', got "(cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[mkfifo '/fifo'] arg_spids:[0 2])
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py36 -G and -O for effective user ID and group ID

[osh_.py stdout] Expected 'status=0\nstatus=1\nstatus=0\nstatus=1\n', got 'status=1\nstatus=1\nstatus=1\nstatus=1\n'

stdout:
status=1
status=1
status=1
status=1
stderr:
osh_.cc36 -G and -O for effective user ID and group ID

[osh_.cc stdout] Expected 'status=0\nstatus=1\nstatus=0\nstatus=1\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.py37 -u for setuid, -g too

[osh_.py stdout] Expected 'status=1\nstatus=0\nstatus=1\nstatus=1\n', got 'status=1\nstatus=0\nstatus=1\nstatus=0\n'

stdout:
status=1
status=0
status=1
status=0
stderr:
osh_.cc37 -u for setuid, -g too

[osh_.cc stdout] Expected 'status=1\nstatus=0\nstatus=1\nstatus=1\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:18: bool bool_stat::DoUnaryOp(id_kind_asdl::Id_t, Str *): Assertion `0' failed.
osh_.cc40 -nt -ot

[osh_.cc status] Expected 1, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed.
osh_.py41 -ef

[osh_.py stdout] Expected 'same\nsame\ndifferent\ndifferent\n', got "(cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12])\n(cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])\ndifferent\ndifferent\n"

stdout:
(cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12])
(cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])
different
different
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc41 -ef

[osh_.cc stdout] Expected 'same\nsame\ndifferent\ndifferent\n', got "(cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12])\n(cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[touch '/left' '/right'] arg_spids:[8 10 12])
(cmd_value.Argv argv:[ln -f '/left' '/hardlink'] arg_spids:[14 16 18 21])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_eval.dbg: cpp/osh_bool_stat.h:22: bool bool_stat::DoBinaryOp(id_kind_asdl::Id_t, Str *, Str *): Assertion `0' failed.
osh_.cc42 Overflow error

[osh_.cc stdout] Expected 'status=2\n', got ''
[osh_.cc status] Expected 0, got -6

stdout:
stderr: 
osh_eval.dbg: cpp/osh_bool_stat.h:14: bool bool_stat::isatty(int, Str *, syntax_asdl::word_t *): Assertion `0' failed.