extglob-match () { sh-spec spec/extglob-match.test.sh $BASH $MKSH $OSH_LIST "$@" } extglob-match: spec test case results

Results for extglob-match.test.sh

statusbashmkshosh
pass 292225
ok 013
N-I 021
BUG 040
total292929
casebashmkshoshdescription
0pass pass pass @ matches exactly one
1pass pass pass @() with variable arms
2pass N-I ok extglob in variable
detailsdetails
3pass pass pass Matching literal '@(cc)'
4pass BUG pass nested @()
details
5pass pass pass nested @() with quotes and vars
6pass pass pass ? matches 0 or 1
7pass pass pass + matches 1 or more
8pass pass pass * matches 0 or more
9pass pass pass simple repetition with *(foo) and +(Foo)
10pass pass pass ! matches none
11pass pass pass match is anchored
12pass pass pass repeated match is anchored
13pass pass pass repetition with glob
14pass pass pass No brace expansion in ==
15pass pass pass adjacent extglob
16pass pass pass nested extglob
17pass pass pass extglob empty string
18pass pass pass extglob empty pattern
19pass pass pass case with extglob
20pass pass pass [[ $x == !($str) ]]
21pass ok ok Turning extglob on changes the meaning of [[ !(str) ]] in bash
detailsdetails
22pass pass pass With extglob on, !($str) on the left or right of == has different meanings
23pass BUG ok extglob inside arg word
detailsdetails
24pass N-I pass extglob is not detected in regex!
details
25pass BUG pass regular glob of single unicode char
details
26pass BUG pass extended glob of single unicode char
details
27pass pass N-I Extended glob in ${x//pat/replace}
details
28pass pass pass Extended glob in ${x%PATTERN}
76 passed, 4 OK, 3 not implemented, 4 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

mksh2 extglob in variable

stdout:
FALSE
FALSE
FALSE
stderr:
mksh: <stdin>[1]: shopt: not found
osh2 extglob in variable

stdout:
stderr: 
  g=--@(help|verbose)
    ^~
[ stdin ]:3: fatal: extended glob not allowed in this word
mksh4 nested @()

stdout:
FALSE
stderr:
mksh: <stdin>[1]: shopt: not found
mksh21 Turning extglob on changes the meaning of [[ !(str) ]] in bash

stdout:
TRUE
TRUE
TRUE
stderr:
mksh: <stdin>[5]: shopt: not found
osh21 Turning extglob on changes the meaning of [[ !(str) ]] in bash

stdout:
stderr: 
  [[ !($empty) ]]  && echo TRUE   # test if $empty is empty
     ^~
[ stdin ]:3: fatal: extended glob not allowed in this word
mksh23 extglob inside arg word

stdout:
TRUE
FALSE
stderr:
mksh: <stdin>[1]: shopt: not found
osh23 extglob inside arg word

stdout:
TRUE
stderr:
  [[ foo == ${unset:-@(foo|bar)} ]] && echo TRUE
                     ^~
[ stdin ]:3: fatal: Extended glob not allowed in this word
mksh24 extglob is not detected in regex!

stdout:
stderr: 
mksh: <stdin>[1]: shopt: not found
mksh: <stdin>[2]: syntax error: '=~' unexpected operator/operand
mksh25 regular glob of single unicode char

stdout:
0
1
stderr:
mksh: <stdin>[1]: shopt: not found
mksh26 extended glob of single unicode char

stdout:
0
1
stderr:
mksh: <stdin>[1]: shopt: not found
osh27 Extended glob in ${x//pat/replace}

stdout:
stderr: 
  echo ${x//@(?.py)/Z}
            ^~
[ stdin ]:3: fatal: extended globs not supported in ${x//GLOB/}