run-file () { local spec_name=$1; shift; local spec_file=spec/$spec_name.test.sh; local suite; suite=$(test/sh_spec.py --print-spec-suite $spec_file); local spec_subdir; case $suite in osh) spec_subdir='osh-cpp' ;; ysh) spec_subdir='ysh-cpp' ;; *) die "Invalid suite $suite" ;; esac; local base_dir=_tmp/spec/$spec_subdir; mkdir -v -p $base_dir; sh-spec $spec_file --timeout 10 --oils-bin-dir $PWD/bin --oils-cpp-bin-dir $REPO_ROOT/_bin/cxx-asan --tsv-output $base_dir/${spec_name}.tsv "$@" } extglob-files: spec test case results

Results for extglob-files.test.sh

statusoshosh-cpp
pass 1818
ok 22
N-I 22
FAIL 11
total2323
caseoshosh-cppdescription
0pass pass @() matches exactly one of the patterns
1pass pass ?() matches 0 or 1
2pass pass *() matches 0 or more
3pass pass +() matches 1 or more
4pass pass !(*.h|*.cc) to match everything except C++
5pass pass Two adjacent alternations
6pass pass Nested extended glob pattern
7pass pass Extended glob patterns with spaces
8pass pass Filenames with spaces
9pass pass nullglob with extended glob
10pass pass Glob other punctuation chars (lexer mode)
11pass pass More glob escaping
12FAIL FAIL Escaping of pipe (glibc bug, see demo/glibc_fnmatch.c)
detailsdetails
13ok ok Extended glob as argument to ${undef:-} (dynamic globbing)
detailsdetails
14ok ok Extended glob in assignment builtin
detailsdetails
15N-I N-I Extended glob in same word as array
detailsdetails
16N-I N-I Extended glob with word splitting
detailsdetails
17pass pass In Array Literal and for loop
18pass pass No extended glob with simple_word_eval (Oil evaluation)
19pass pass no match
20pass pass dashglob
21pass pass noglob
22pass pass failglob
36 passed, 4 OK, 4 not implemented, 0 BUG, 1 failed, 0 timeouts, 0 cases skipped
1 failed under osh

Details on runs that didn't PASS

osh12 Escaping of pipe (glibc bug, see demo/glibc_fnmatch.c)

[osh stdout] Expected "['__|', 'foo']\n['__|', 'foo']\n", got "['foo']\n['foo']\n"

stdout:
['foo']
['foo']
stderr:
osh-cpp12 Escaping of pipe (glibc bug, see demo/glibc_fnmatch.c)

[osh-cpp stdout] Expected "['__|', 'foo']\n['__|', 'foo']\n", got "['foo']\n['foo']\n"

stdout:
['foo']
['foo']
stderr:
osh13 Extended glob as argument to ${undef:-} (dynamic globbing)

stdout:
bar.py foo.py spam.py
stderr:
  echo ${undef:-@(foo|bar).py}
                ^~
[ stdin ]:9: fatal: Extended glob not allowed in this word
osh-cpp13 Extended glob as argument to ${undef:-} (dynamic globbing)

stdout:
bar.py foo.py spam.py
stderr:
  echo ${undef:-@(foo|bar).py}
                ^~
[ stdin ]:9: fatal: Extended glob not allowed in this word
osh14 Extended glob in assignment builtin

stdout:
stderr: 
  typeset -@(*.py) myvar
          ^
[ stdin ]:5: fatal: Extended glob not allowed in this word
osh-cpp14 Extended glob in assignment builtin

stdout:
stderr: 
  typeset -@(*.py) myvar
          ^
[ stdin ]:5: fatal: Extended glob not allowed in this word
osh15 Extended glob in same word as array

stdout:
['a b', 'c']
['star', 'glob', 'a b c.py']
['star', 'extglob', 'a b c.cc', 'a b c.py']
stderr:
  argv.py at extglob "$@"*@(.py|cc)
                     ^
[ stdin ]:13: fatal: Extended globs and arrays can't appear in the same word
osh-cpp15 Extended glob in same word as array

stdout:
['a b', 'c']
['star', 'glob', 'a b c.py']
['star', 'extglob', 'a b c.cc', 'a b c.py']
stderr:
  argv.py at extglob "$@"*@(.py|cc)
                     ^
[ stdin ]:13: fatal: Extended globs and arrays can't appear in the same word
osh16 Extended glob with word splitting

stdout:
['a b*.@(cc|h)']
stderr:
osh-cpp16 Extended glob with word splitting

stdout:
['a b*.@(cc|h)']
stderr: