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/>.
14 # tests of the backslash-in-glob-patterns discussion on the austin-group ML
15 [ $UID -eq 0 ] && { echo "glob6.sub: the test suite should not be run as root" >&2 ; }
20 GLOBDIR=$TMPDIR/bash-glob-$$
21 mkdir $GLOBDIR || { echo "glob6.sub: cannot make directory $GLOBDIR" >&2 ; exit 1; }
22 builtin cd $GLOBDIR || { echo "glob6.sub: cannot change directory to $GLOBDIR" >&2 ; exit 1; }
24 # does the pattern matcher allow backslashes as escape characters and remove
25 # them as part of matching?
33 # how about when escaping pattern characters?
39 # how about when making the distinction between readable and searchable path
41 mkdir -m a=x searchable
56 printf "%s\n" 'searchable/\.'
57 printf "%s\n" 'readable/\.'
66 rmdir searchable readable