Results for glob.test.sh

statusoshosh_.pyosh_.cc
pass 302610
FAIL 71127
total373737
caseoshosh_.pyosh_.ccdescription
0pass pass pass glob double quote escape
1pass pass pass glob single quote escape
2pass pass pass glob backslash escape
3pass FAIL FAIL 1 char glob
detailsdetails
4pass pass pass 0 char glob -- does NOT work
5pass pass pass looks like glob at the start, but isn't
6pass pass pass looks like glob plus negation at the start, but isn't
7pass FAIL FAIL glob can expand to command and arg
detailsdetails
8pass pass FAIL glob after var expansion
details
9pass pass FAIL quoted var expansion with glob meta characters
details
10pass pass pass glob after "$@" expansion
11pass pass pass glob after $@ expansion
12pass pass FAIL no glob after ~ expansion
details
13pass pass FAIL store literal globs in array then expand
details
14pass pass FAIL glob inside array
details
15pass pass FAIL glob with escaped - in char class
details
16pass pass FAIL glob with char class expression
details
17pass pass FAIL glob double quotes
details
18pass pass FAIL glob escaped
details
19pass pass FAIL : escaped
details
20pass FAIL FAIL Redirect to glob, not evaluated
detailsdetails
21pass pass FAIL Glob after var manipulation
details
22pass pass FAIL Glob after part joining
details
23pass pass FAIL Glob flags on file system
details
24pass FAIL FAIL set -o noglob
detailsdetails
25pass pass pass set -o noglob (bug #698)
26pass pass FAIL shopt -s nullglob
details
27FAIL FAIL FAIL shopt -s failglob in command context
detailsdetailsdetails
28FAIL FAIL FAIL shopt -s failglob in loop context
detailsdetailsdetails
29FAIL FAIL FAIL Don't glob flags on file system with GLOBIGNORE
detailsdetailsdetails
30pass pass pass Splitting/Globbing doesn't happen on local assignment
31pass pass FAIL Glob of unescaped [[] and []]
details
32pass pass FAIL Glob of negated unescaped [[] and []]
details
33FAIL FAIL FAIL PatSub of unescaped [[] and []]
detailsdetailsdetails
34FAIL FAIL FAIL PatSub of negated unescaped [[] and []]
detailsdetailsdetails
35FAIL FAIL FAIL Glob unicode char
detailsdetailsdetails
36FAIL FAIL FAIL dotglob (bash option that dashglob is roughly consistent with)
detailsdetailsdetails
66 passed, 0 OK, 0 not implemented, 0 BUG, 45 failed, 0 timeouts, 0 cases skipped
7 failed under osh

Details on runs that didn't PASS

osh_.py3 1 char glob

[osh_.py stdout] Expected 'bin\n', got '[b]in\n'

stdout:
[b]in
stderr:
[??? no location ???] $HOME isn't defined
osh_.cc3 1 char glob

[osh_.cc stdout] Expected 'bin\n', got '[b]in\n'

stdout:
[b]in
stderr:
[??? no location ???] $HOME isn't defined
osh_.py7 glob can expand to command and arg

[osh_.py stdout] Expected 'spec/testdata/echo.sz\n', got ''
[osh_.py status] Expected 0, got 1

stdout:
stderr: 
[??? no location ???] $HOME isn't defined
Error running ['spec/testdata/echo.s[hz]']: [Errno 2] No such file or directory
osh_.cc7 glob can expand to command and arg

[osh_.cc stdout] Expected 'spec/testdata/echo.sz\n', got "(cmd_value.Argv argv:['spec/testdata/echo.s[hz]'] arg_spids:[4])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:['spec/testdata/echo.s[hz]'] arg_spids:[4])
stderr:
[??? no location ???] $HOME isn't defined
Unhandled SimpleCommand
getline() error: No such file or directory
terminate called after throwing an instance of 'AssertionError*'
osh_.cc8 glob after var expansion

[osh_.cc stdout] Expected '_tmp/a.A _tmp/aa.A _tmp/b.B\n', got "(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])\n_tmp/a.A _tmp/aa.A _tmp/b.B\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])
_tmp/a.A _tmp/aa.A _tmp/b.B
stderr:
Unhandled SimpleCommand
osh_.cc9 quoted var expansion with glob meta characters

[osh_.cc stdout] Expected '[ _tmp/*.A ]\n', got "(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])\n[ _tmp/*.A ]\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])
[ _tmp/*.A ]
stderr:
Unhandled SimpleCommand
osh_.cc12 no glob after ~ expansion

[osh_.cc stdout] Expected '*/*.py\n', got '~/*.py\n'
[osh_.cc status] Expected 0, got -6

stdout:
~/*.py
stderr:
getline() error: No such file or directory
terminate called after throwing an instance of 'AssertionError*'
osh_.cc13 store literal globs in array then expand

[osh_.cc stdout] Expected '_tmp/a.A _tmp/aa.A _tmp/b.B\n', got "(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])\n_tmp/a.A _tmp/aa.A _tmp/b.B\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])
_tmp/a.A _tmp/aa.A _tmp/b.B
stderr:
Unhandled SimpleCommand
osh_.cc14 glob inside array

[osh_.cc stdout] Expected '_tmp/a.A _tmp/aa.A _tmp/b.B\n', got "(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])\n_tmp/a.A _tmp/aa.A _tmp/b.B\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/a.A' '_tmp/aa.A' '_tmp/b.B'] arg_spids:[0 2 4 6])
_tmp/a.A _tmp/aa.A _tmp/b.B
stderr:
Unhandled SimpleCommand
osh_.cc15 glob with escaped - in char class

[osh_.cc stdout] Expected '_tmp/c.C _tmp/c.C _tmp/foo.-\n', got "(cmd_value.Argv argv:[touch '_tmp/foo.-'] arg_spids:[0 2])\n(cmd_value.Argv argv:[touch '_tmp/c.C'] arg_spids:[4 6])\n_tmp/c.C _tmp/c.C _tmp/foo.-\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/foo.-'] arg_spids:[0 2])
(cmd_value.Argv argv:[touch '_tmp/c.C'] arg_spids:[4 6])
_tmp/c.C _tmp/c.C _tmp/foo.-
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc16 glob with char class expression

[osh_.cc stdout] Expected '_tmp/e.E _tmp/foo.-\n', got "(cmd_value.Argv argv:[touch '_tmp/e.E' '_tmp/foo.-'] arg_spids:[0 2 4])\n_tmp/e.E _tmp/foo.-\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/e.E' '_tmp/foo.-'] arg_spids:[0 2 4])
_tmp/e.E _tmp/foo.-
stderr:
Unhandled SimpleCommand
osh_.cc17 glob double quotes

[osh_.cc stdout] Expected '_tmp/"quoted.py"\n', got '(cmd_value.Argv argv:[touch \'_tmp/"quoted.py"\'] arg_spids:[0 2])\n_tmp/"quoted.py"\n'

stdout:
(cmd_value.Argv argv:[touch '_tmp/"quoted.py"'] arg_spids:[0 2])
_tmp/"quoted.py"
stderr:
Unhandled SimpleCommand
osh_.cc18 glob escaped

[osh_.cc stdout] Expected '_tmp/[abc] _tmp/?\n', got "(cmd_value.Argv argv:[touch '_tmp/[abc]' '_tmp/?'] arg_spids:[0 2 7])\n_tmp/[abc] _tmp/?\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/[abc]' '_tmp/?'] arg_spids:[0 2 7])
_tmp/[abc] _tmp/?
stderr:
Unhandled SimpleCommand
osh_.cc19 : escaped

[osh_.cc stdout] Expected '_tmp/foo.- _tmp/*.[[:punct:]]\n', got "(cmd_value.Argv argv:[touch '_tmp/foo.-'] arg_spids:[0 2])\n_tmp/foo.- _tmp/*.[[:punct:]]\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/foo.-'] arg_spids:[0 2])
_tmp/foo.- _tmp/*.[[:punct:]]
stderr:
Unhandled SimpleCommand
osh_.py20 Redirect to glob, not evaluated

[osh_.py status] Expected 0, got 1

stdout:
foo
stderr:
cat: '_tmp/*.F': No such file or directory
osh_.cc20 Redirect to glob, not evaluated

[osh_.cc stdout] Expected 'foo\n', got "(cmd_value.Argv argv:[rm '_tmp/f.F'] arg_spids:[0 2])\n(cmd_value.Argv argv:[touch '_tmp/f.F'] arg_spids:[6 8])\nfoo\n(cmd_value.Argv argv:[cat '_tmp/*.F'] arg_spids:[20 22])\n"

stdout:
(cmd_value.Argv argv:[rm '_tmp/f.F'] arg_spids:[0 2])
(cmd_value.Argv argv:[touch '_tmp/f.F'] arg_spids:[6 8])
foo
(cmd_value.Argv argv:[cat '_tmp/*.F'] arg_spids:[20 22])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
Unhandled SimpleCommand
osh_.cc21 Glob after var manipulation

[osh_.cc stdout] Expected '_tmp/*.zzzZ _tmp/bar.zzz _tmp/foo.zzz\n', got "(cmd_value.Argv argv:[touch '_tmp/foo.zzz' '_tmp/bar.zzz'] arg_spids:[0 2 4])\n_tmp/*.zzzZ _tmp/bar.zzz _tmp/foo.zzz\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/foo.zzz' '_tmp/bar.zzz'] arg_spids:[0 2 4])
_tmp/*.zzzZ _tmp/bar.zzz _tmp/foo.zzz
stderr:
Unhandled SimpleCommand
osh_.cc22 Glob after part joining

[osh_.cc stdout] Expected '_tmp/*.yy _tmp/bar.yyy _tmp/foo.yyy\n', got "(cmd_value.Argv argv:[touch '_tmp/foo.yyy' '_tmp/bar.yyy'] arg_spids:[0 2 4])\n_tmp/*.yy _tmp/bar.yyy _tmp/foo.yyy\n"

stdout:
(cmd_value.Argv argv:[touch '_tmp/foo.yyy' '_tmp/bar.yyy'] arg_spids:[0 2 4])
_tmp/*.yy _tmp/bar.yyy _tmp/foo.yyy
stderr:
Unhandled SimpleCommand
osh_.cc23 Glob flags on file system

[osh_.cc stdout] Expected u'hello zzzzz', got "(cmd_value.Argv argv:[touch '_tmp/-n' '_tmp/zzzzz'] arg_spids:[0 2 4])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[touch '_tmp/-n' '_tmp/zzzzz'] arg_spids:[0 2 4])
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/pylib_os_path.h:10: Str *os_path::join(Str *, Str *): Assertion `0' failed.
osh_.py24 set -o noglob

[osh_.py stdout] Expected u'_tmp/spec-tmp/a.zz _tmp/spec-tmp/b.zz\n_tmp/spec-tmp/*.zz\n', got '_tmp/spec-tmp/*.zz\n_tmp/spec-tmp/*.zz\n'

stdout:
_tmp/spec-tmp/*.zz
_tmp/spec-tmp/*.zz
stderr:
[??? no location ???] $HOME isn't defined
touch: cannot touch '_tmp/spec-tmp/a.zz': No such file or directory
touch: cannot touch '_tmp/spec-tmp/b.zz': No such file or directory
osh_.cc24 set -o noglob

[osh_.cc stdout] Expected u'_tmp/spec-tmp/a.zz _tmp/spec-tmp/b.zz\n_tmp/spec-tmp/*.zz\n', got "(cmd_value.Argv argv:[touch '_tmp/spec-tmp/a.zz' '_tmp/spec-tmp/b.zz'] arg_spids:[4 6 8])\n_tmp/spec-tmp/*.zz\n_tmp/spec-tmp/*.zz\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[touch '_tmp/spec-tmp/a.zz' '_tmp/spec-tmp/b.zz'] arg_spids:[4 6 8])
_tmp/spec-tmp/*.zz
_tmp/spec-tmp/*.zz
stderr:
[??? no location ???] $HOME isn't defined
Unhandled SimpleCommand
getline() error: No such file or directory
terminate called after throwing an instance of 'AssertionError*'
osh_.cc26 shopt -s nullglob

[osh_.cc stdout] Expected u"['_tmp/spec-tmp/*.nonexistent']\n[]\n", got "(cmd_value.Argv argv:[argv.py '_tmp/spec-tmp/*.nonexistent'] arg_spids:[0 2])\n(cmd_value.Argv argv:[argv.py] arg_spids:[12])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[argv.py '_tmp/spec-tmp/*.nonexistent'] arg_spids:[0 2])
(cmd_value.Argv argv:[argv.py] arg_spids:[12])
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
getline() error: No such file or directory
terminate called after throwing an instance of 'AssertionError*'
osh27 shopt -s failglob in command context

[osh stdout] Expected "['*.ZZ']\nstatus=1\n", got "['*.ZZ']\n['*.ZZ']\nstatus=0\n"

stdout:
['*.ZZ']
['*.ZZ']
status=0
stderr:
osh_.py27 shopt -s failglob in command context

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

stdout:
['*.ZZ']
['*.ZZ']
status=0
stderr:
osh_.cc27 shopt -s failglob in command context

[osh_.cc stdout] Expected "['*.ZZ']\nstatus=1\n", got "(cmd_value.Argv argv:[argv.py '*.ZZ'] arg_spids:[0 2])\n(cmd_value.Argv argv:[argv.py '*.ZZ'] arg_spids:[11 13])\nstatus=0\n"

stdout:
(cmd_value.Argv argv:[argv.py '*.ZZ'] arg_spids:[0 2])
(cmd_value.Argv argv:[argv.py '*.ZZ'] arg_spids:[11 13])
status=0
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
osh28 shopt -s failglob in loop context

[osh stdout] Expected '*.ZZ\nstatus=0\nstatus=1\n', got '*.ZZ\nstatus=0\n*.ZZ\nstatus=0\n'

stdout:
*.ZZ
status=0
*.ZZ
status=0
stderr:
osh_.py28 shopt -s failglob in loop context

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

stdout:
*.ZZ
status=0
*.ZZ
status=0
stderr:
osh_.cc28 shopt -s failglob in loop context

[osh_.cc stdout] Expected '*.ZZ\nstatus=0\nstatus=1\n', got '*.ZZ\nstatus=0\n*.ZZ\nstatus=0\n'

stdout:
*.ZZ
status=0
*.ZZ
status=0
stderr:
osh29 Don't glob flags on file system with GLOBIGNORE

[osh stdout] Expected u'-* hello zzzz?\n', got 'hello zzzzz'

stdout:
hello zzzzz
stderr:
osh_.py29 Don't glob flags on file system with GLOBIGNORE

[osh_.py stdout] Expected u'-* hello zzzz?\n', got '0\nhello zzzzz'

stdout:
0
hello zzzzz
stderr:
osh_.cc29 Don't glob flags on file system with GLOBIGNORE

[osh_.cc stdout] Expected u'-* hello zzzz?\n', got "(cmd_value.Argv\n argv: [expr '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg' ':' '.*/osh$']\n arg_spids: [0 2 4 6]\n)\n"
[osh_.cc status] Expected 0, got 1

stdout:
(cmd_value.Argv
  argv: [expr '/home/andy/git/oilshell/oil/_bin/osh_eval.dbg' ':' '.*/osh$']
  arg_spids: [0 2 4 6]
)
stderr:
Unhandled SimpleCommand
osh_.cc31 Glob of unescaped [[] and []]

[osh_.cc stdout] Expected '[ ]\n[ ]\n', got "(cmd_value.Argv argv:[touch '/[' '/]'] arg_spids:[0 2 6])\n[ ]\n[ ]\n"

stdout:
(cmd_value.Argv argv:[touch '/[' '/]'] arg_spids:[0 2 6])
[ ]
[ ]
stderr:
Unhandled SimpleCommand
[??? no location ???] $HOME isn't defined
osh_.cc32 Glob of negated unescaped [[] and []]

[osh_.cc stdout] Expected '_G _G\n_G _G\n', got "(cmd_value.Argv argv:[touch '/_G'] arg_spids:[0 2])\n_G _G\n_G _G\n"

stdout:
(cmd_value.Argv argv:[touch '/_G'] arg_spids:[0 2])
_G _G
_G _G
stderr:
Unhandled SimpleCommand
[??? no location ???] $HOME isn't defined
osh33 PatSub of unescaped [[] and []]

[osh stdout] Expected '<foo]\n[foo>\n<foo]\n[foo>\n', got '<foo]\n[foo>\n[foo]\n[foo>\n'

stdout:
<foo]
[foo>
[foo]
[foo>
stderr:
osh_.py33 PatSub of unescaped [[] and []]

[osh_.py stdout] Expected '<foo]\n[foo>\n<foo]\n[foo>\n', got '<foo]\n[foo>\n[foo]\n[foo>\n'

stdout:
<foo]
[foo>
[foo]
[foo>
stderr:
osh_.cc33 PatSub of unescaped [[] and []]

[osh_.cc stdout] Expected '<foo]\n[foo>\n<foo]\n[foo>\n', got '<foo]\n[foo>\n[foo]\n[foo>\n'

stdout:
<foo]
[foo>
[foo]
[foo>
stderr:
osh34 PatSub of negated unescaped [[] and []]

[osh stdout] Expected '[<<<<\n>>>>]\n[<<<<\n', got '[<<<<\n>>>>]\n[foo]\n'

stdout:
[<<<<
>>>>]
[foo]
stderr:
osh_.py34 PatSub of negated unescaped [[] and []]

[osh_.py stdout] Expected '[<<<<\n>>>>]\n[<<<<\n', got '[<<<<\n>>>>]\n[foo]\n'

stdout:
[<<<<
>>>>]
[foo]
stderr:
osh_.cc34 PatSub of negated unescaped [[] and []]

[osh_.cc stdout] Expected '[<<<<\n>>>>]\n[<<<<\n', got '[<<<<\n>>>>]\n[foo]\n'
[osh_.cc status] Expected 0, got -6

stdout:
[<<<<
>>>>]
[foo]
stderr:
getline() error: Invalid or incomplete multibyte or wide character
terminate called after throwing an instance of 'AssertionError*'
osh35 Glob unicode char

[osh stdout] Expected '__a__ __\xce\xbc__\n', got '__a__\n'

stdout:
__a__
stderr:
osh_.py35 Glob unicode char

[osh_.py stdout] Expected '__a__ __\xce\xbc__\n', got '__a__\n'

stdout:
__a__
stderr:
touch: cannot touch '/__a__': Permission denied
touch: cannot touch '/__μ__': Permission denied
[??? no location ???] $HOME isn't defined
osh_.cc35 Glob unicode char

[osh_.cc stdout] Expected '__a__ __\xce\xbc__\n', got "(cmd_value.Argv argv:[touch '/__a__'] arg_spids:[0 2])\n(cmd_value.Argv argv:[touch '/__\xce\xbc__'] arg_spids:[5 7])\n__a__\n"

stdout:
(cmd_value.Argv argv:[touch '/__a__'] arg_spids:[0 2])
(cmd_value.Argv argv:[touch '/__μ__'] arg_spids:[5 7])
__a__
stderr:
Unhandled SimpleCommand
Unhandled SimpleCommand
[??? no location ???] $HOME isn't defined
osh36 dotglob (bash option that dashglob is roughly consistent with)

[osh stdout] Expected 'other\n.foorc other\n', got 'other\nother\n'

stdout:
other
other
stderr:
osh_.py36 dotglob (bash option that dashglob is roughly consistent with)

[osh_.py stdout] Expected 'other\n.foorc other\n', got '[ ] _G __a__ __\xce\xbc__ _tmp dotglob other\n[ ] _G __a__ __\xce\xbc__ _tmp dotglob other\n'

stdout:
[ ] _G __a__ __μ__ _tmp dotglob other
[ ] _G __a__ __μ__ _tmp dotglob other
stderr:
mkdir: cannot create directory ‘/dotglob’: Permission denied
  cd $TMP/dotglob
     ^~~~
[ stdin ]:2: cd '/dotglob': No such file or directory
osh_.cc36 dotglob (bash option that dashglob is roughly consistent with)

[osh_.cc stdout] Expected 'other\n.foorc other\n', got "(cmd_value.Argv argv:[mkdir -p '/dotglob'] arg_spids:[0 2 4])\n"
[osh_.cc status] Expected 0, got -6

stdout:
(cmd_value.Argv argv:[mkdir -p '/dotglob'] arg_spids:[0 2 4])
stderr:
Unhandled SimpleCommand
osh_eval.dbg: cpp/pylib_os_path.h:10: Str *os_path::join(Str *, Str *): Assertion `0' failed.