1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 [[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match 1
18 [[ ab/../ == +([^/])/..?(/) ]] && echo match 2
20 [[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 3
22 [[ ab/../ == +([^/])/../ ]] && echo match 4
24 [[ ab/../ == +([!/])/..?(/) ]] && echo match 1a
26 [[ ab/../ == @(ab|+([!/]))/..?(/) ]] && echo match 1b
28 [[ ab/../ == +([!/])/../ ]] && echo match 2a
30 [[ ab/../ == +([!/])/..?(/) ]] && echo match 2b
32 [[ ab/../ == +([!/])/..@(/) ]] && echo match 3a
34 [[ ab/../ == +(ab)/..?(/) ]] && echo match 3b
36 [[ ab/../ == [!/][!/]/../ ]] && echo match 4a
38 [[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 4b
40 [[ ab/../ == [^/][^/]/../ ]] && echo match 5
42 [[ ab/../ == ?b/..?(/) ]] && echo match 6
44 [[ ab/../ == +(?b)/..?(/) ]] && echo match 7
46 [[ ab/../ == +(?b|?b)/..?(/) ]] && echo match 8
48 [[ ab/../ == @(?b|?b)/..?(/) ]] && echo match 9
50 [[ ab/../ == @(a?|?b)/..?(/) ]] && echo match 10
52 [[ ab/../ == ?(ab)/..?(/) ]] && echo match 11
54 [[ ab/../ == ?(ab|??)/..?(/) ]] && echo match 12
56 [[ ab/../ == @(??)/..?(/) ]] && echo match 13
58 [[ ab/../ == @(??|a*)/..?(/) ]] && echo match 14
60 [[ ab/../ == @(a*)/..?(/) ]] && echo match 15
62 [[ ab/../ == +(??)/..?(/) ]] && echo match 16
64 [[ ab/../ == +(??|a*)/..?(/) ]] && echo match 17
66 [[ ab/../ == +(a*)/..?(/) ]] && echo match 18
69 j="@(x)" ; [[ x == $j ]] && echo ok 19