3 common_objpfx=$1; shift
7 testdir=$TMPDIR/globtest-dir
8 testout=$TMPDIR/globtest-out
10 trap 'rm -fr $testdir $testout' 1 2 3 15
14 echo 1 > $testdir/file1
15 echo 2 > $testdir/file2
18 echo 1_1 > $testdir/dir1/file1_1
19 echo 1_2 > $testdir/dir1/file1_2
24 LD_LIBRARY_PATH=$common_objpfx \
25 ${common_objpfx}posix/globtest "$testdir" "*" |
27 cat <<"EOF" | cmp - $testout || result=1
35 LD_LIBRARY_PATH=$common_objpfx \
36 ${common_objpfx}posix/globtest "$testdir" "*/*" |
38 cat <<"EOF" | cmp - $testout || result=1
44 LD_LIBRARY_PATH=$common_objpfx \
45 ${common_objpfx}posix/globtest "$testdir" "*/1" |
47 cat <<"EOF" | cmp - $testout || result=1
52 LD_LIBRARY_PATH=$common_objpfx \
53 ${common_objpfx}posix/globtest "$testdir" "*/*1_1" |
55 cat <<"EOF" | cmp - $testout || result=1
60 LD_LIBRARY_PATH=$common_objpfx \
61 ${common_objpfx}posix/globtest "$testdir" "*/file1_1" |
63 cat <<"EOF" | cmp - $testout || result=1
68 LD_LIBRARY_PATH=$common_objpfx \
69 ${common_objpfx}posix/globtest "$testdir" "*-/*" |
71 cat <<"EOF" | cmp - $testout || result=1
76 LD_LIBRARY_PATH=$common_objpfx \
77 ${common_objpfx}posix/globtest "$testdir" "*-" |
79 cat <<"EOF" | cmp - $testout || result=1
84 if test $result -eq 0; then
85 rm -fr $testdir $testout
90 # Preserve executable bits for this shell script.
92 eval:(defun frobme () (set-file-modes buffer-file-name file-mode))
93 eval:(make-local-variable 'file-mode)
94 eval:(setq file-mode (file-modes (buffer-file-name)))
95 eval:(make-local-variable 'after-save-hook)
96 eval:(add-hook 'after-save-hook 'frobme)