Results for extglob-match.test.sh

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

Details on runs that didn't PASS

osh2 extglob in variable

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

stdout:
stderr: 
  g=--@(help|verbose)
    ^~
[ stdin ]:3: fatal: extended glob not allowed in this word
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
osh-cpp21 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
osh23 extglob inside arg word

stdout:
TRUE
stderr:
  [[ foo == ${unset:-@(foo|bar)} ]] && echo TRUE
                     ^~
[ stdin ]:3: fatal: Extended glob not allowed in this word
osh-cpp23 extglob inside arg word

stdout:
TRUE
stderr:
  [[ foo == ${unset:-@(foo|bar)} ]] && echo TRUE
                     ^~
[ stdin ]:3: fatal: Extended glob not allowed in this word
osh27 Extended glob in ${x//pat/replace}

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

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