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 TESTDIR=${TMPDIR}/glob-test-$$
19 echo "$TESTDIR: cannot cd" >&2
32 [[:alpha:]) echo bad 1;;
43 [[:alpha:]) echo ok 2;;
48 [[:aeioux:]) echo bad 2.1 ;;
53 [[:alpha:]) echo bad 3;;
57 # unclosed bracket char class expression just matches against ":alpha"
59 [[:alpha]) echo ok 4;;
64 echo invalid bracket expression
68 export LANG=en_US.UTF-8
78 # quoted character classes work as if they were unquoted now
84 [[:aleph:]]) echo bad 1;;
89 [[:aleph:]]) echo bad 2;;
94 [[:"alpha":]]) echo bad 3;;
98 # Posix says quoted character class names work now
100 [[:"alpha":]]) echo ok 4;;
105 [abc[:foo:]]) echo ok 5;;
110 [[:foo:]abc]) echo ok 6;;
115 echo invalid character class
119 export LANG=en_US.UTF-8
126 echo == LANG=$LANG ==
129 [[.hyphen.]) echo bad 1;;
134 [[.hyphen.]]) echo ok 2;;
139 [[.slash.]]) echo bad 3;;
144 [abc[.nonsense.]]) echo ok 4;;
149 [[.nonsense.]abc]) echo ok 5;;
154 echo invalid collating symbols
159 export LANG=en_US.UTF-8