2 # This script was generated automatically by ./../mk-script.
7 test "$VERBOSE" && echo=echo ||
echo=:
8 $echo testing program
: $xx
10 test "$srcdir" || srcdir
=.
11 test "$VERBOSE" && $xx --version 2> /dev
/null
13 # Make sure we get English translations.
21 filename_args
="$srcdir/quotable\a"
23 for arg
in $filename_args; do
25 basename_arg
=`echo $arg|sed 's,.*/,,'`
26 test -f $basename_arg ||
cp -a $arg .
29 new_filename_args
="$new_filename_args $arg"
31 filename_args
=$new_filename_args
33 $xx $filename_args > q-.O
2> q-.E
35 if test $code != 0 ; then
36 $echo "Test q- failed: ../../src/ls return code $code differs from expected value 0" 1>&2
37 errors
=`expr $errors + 1`
39 cmp q-.O
$srcdir/q-.X
> /dev
/null
2>&1
41 0) if test "$VERBOSE" ; then $echo "passed q-"; fi ;;
42 1) $echo "Test q- failed: files q-.O and $srcdir/q-.X differ" 1>&2;
43 errors
=`expr $errors + 1` ;;
44 2) $echo "Test q- may have failed." 1>&2;
45 $echo The
command "cmp q-.O $srcdir/q-.X" failed.
1>&2 ;
46 errors
=`expr $errors + 1` ;;
49 test -s q-.E ||
rm -f q-.E
50 filename_args
="$srcdir/quotable\a"
52 for arg
in $filename_args; do
54 basename_arg
=`echo $arg|sed 's,.*/,,'`
55 test -f $basename_arg ||
cp -a $arg .
58 new_filename_args
="$new_filename_args $arg"
60 filename_args
=$new_filename_args
62 $xx -N $filename_args > q-N.O
2> q-N.E
64 if test $code != 0 ; then
65 $echo "Test q-N failed: ../../src/ls return code $code differs from expected value 0" 1>&2
66 errors
=`expr $errors + 1`
68 cmp q-N.O
$srcdir/q-N.X
> /dev
/null
2>&1
70 0) if test "$VERBOSE" ; then $echo "passed q-N"; fi ;;
71 1) $echo "Test q-N failed: files q-N.O and $srcdir/q-N.X differ" 1>&2;
72 errors
=`expr $errors + 1` ;;
73 2) $echo "Test q-N may have failed." 1>&2;
74 $echo The
command "cmp q-N.O $srcdir/q-N.X" failed.
1>&2 ;
75 errors
=`expr $errors + 1` ;;
78 test -s q-N.E ||
rm -f q-N.E
79 filename_args
="$srcdir/quotable\a"
81 for arg
in $filename_args; do
83 basename_arg
=`echo $arg|sed 's,.*/,,'`
84 test -f $basename_arg ||
cp -a $arg .
87 new_filename_args
="$new_filename_args $arg"
89 filename_args
=$new_filename_args
91 $xx -q $filename_args > q-q.O
2> q-q.E
93 if test $code != 0 ; then
94 $echo "Test q-q failed: ../../src/ls return code $code differs from expected value 0" 1>&2
95 errors
=`expr $errors + 1`
97 cmp q-q.O
$srcdir/q-q.X
> /dev
/null
2>&1
99 0) if test "$VERBOSE" ; then $echo "passed q-q"; fi ;;
100 1) $echo "Test q-q failed: files q-q.O and $srcdir/q-q.X differ" 1>&2;
101 errors
=`expr $errors + 1` ;;
102 2) $echo "Test q-q may have failed." 1>&2;
103 $echo The
command "cmp q-q.O $srcdir/q-q.X" failed.
1>&2 ;
104 errors
=`expr $errors + 1` ;;
107 test -s q-q.E ||
rm -f q-q.E
108 filename_args
="$srcdir/quotable\a"
110 for arg
in $filename_args; do
111 if test -r $arg; then
112 basename_arg
=`echo $arg|sed 's,.*/,,'`
113 test -f $basename_arg ||
cp -a $arg .
116 new_filename_args
="$new_filename_args $arg"
118 filename_args
=$new_filename_args
120 $xx -Q $filename_args > q-Q.O
2> q-Q.E
122 if test $code != 0 ; then
123 $echo "Test q-Q failed: ../../src/ls return code $code differs from expected value 0" 1>&2
124 errors
=`expr $errors + 1`
126 cmp q-Q.O
$srcdir/q-Q.X
> /dev
/null
2>&1
128 0) if test "$VERBOSE" ; then $echo "passed q-Q"; fi ;;
129 1) $echo "Test q-Q failed: files q-Q.O and $srcdir/q-Q.X differ" 1>&2;
130 errors
=`expr $errors + 1` ;;
131 2) $echo "Test q-Q may have failed." 1>&2;
132 $echo The
command "cmp q-Q.O $srcdir/q-Q.X" failed.
1>&2 ;
133 errors
=`expr $errors + 1` ;;
136 test -s q-Q.E ||
rm -f q-Q.E
137 filename_args
="$srcdir/q\a"
139 for arg
in $filename_args; do
140 if test -r $arg; then
141 basename_arg
=`echo $arg|sed 's,.*/,,'`
142 test -f $basename_arg ||
cp -a $arg .
145 new_filename_args
="$new_filename_args $arg"
147 filename_args
=$new_filename_args
149 $xx --quoting=literal
$filename_args > q-qs-lit.O
2> q-qs-lit.E
151 if test $code != 0 ; then
152 $echo "Test q-qs-lit failed: ../../src/ls return code $code differs from expected value 0" 1>&2
153 errors
=`expr $errors + 1`
155 cmp q-qs-lit.O
$srcdir/q-qs-lit.X
> /dev
/null
2>&1
157 0) if test "$VERBOSE" ; then $echo "passed q-qs-lit"; fi ;;
158 1) $echo "Test q-qs-lit failed: files q-qs-lit.O and $srcdir/q-qs-lit.X differ" 1>&2;
159 errors
=`expr $errors + 1` ;;
160 2) $echo "Test q-qs-lit may have failed." 1>&2;
161 $echo The
command "cmp q-qs-lit.O $srcdir/q-qs-lit.X" failed.
1>&2 ;
162 errors
=`expr $errors + 1` ;;
165 test -s q-qs-lit.E ||
rm -f q-qs-lit.E
166 filename_args
="$srcdir/q\a"
168 for arg
in $filename_args; do
169 if test -r $arg; then
170 basename_arg
=`echo $arg|sed 's,.*/,,'`
171 test -f $basename_arg ||
cp -a $arg .
174 new_filename_args
="$new_filename_args $arg"
176 filename_args
=$new_filename_args
178 $xx --quoting=shell
$filename_args > q-qs-sh.O
2> q-qs-sh.E
180 if test $code != 0 ; then
181 $echo "Test q-qs-sh failed: ../../src/ls return code $code differs from expected value 0" 1>&2
182 errors
=`expr $errors + 1`
184 cmp q-qs-sh.O
$srcdir/q-qs-sh.X
> /dev
/null
2>&1
186 0) if test "$VERBOSE" ; then $echo "passed q-qs-sh"; fi ;;
187 1) $echo "Test q-qs-sh failed: files q-qs-sh.O and $srcdir/q-qs-sh.X differ" 1>&2;
188 errors
=`expr $errors + 1` ;;
189 2) $echo "Test q-qs-sh may have failed." 1>&2;
190 $echo The
command "cmp q-qs-sh.O $srcdir/q-qs-sh.X" failed.
1>&2 ;
191 errors
=`expr $errors + 1` ;;
194 test -s q-qs-sh.E ||
rm -f q-qs-sh.E
195 filename_args
="$srcdir/q\a"
197 for arg
in $filename_args; do
198 if test -r $arg; then
199 basename_arg
=`echo $arg|sed 's,.*/,,'`
200 test -f $basename_arg ||
cp -a $arg .
203 new_filename_args
="$new_filename_args $arg"
205 filename_args
=$new_filename_args
207 $xx --quoting=shell-always
$filename_args > q-qs-sh-a.O
2> q-qs-sh-a.E
209 if test $code != 0 ; then
210 $echo "Test q-qs-sh-a failed: ../../src/ls return code $code differs from expected value 0" 1>&2
211 errors
=`expr $errors + 1`
213 cmp q-qs-sh-a.O
$srcdir/q-qs-sh-a.X
> /dev
/null
2>&1
215 0) if test "$VERBOSE" ; then $echo "passed q-qs-sh-a"; fi ;;
216 1) $echo "Test q-qs-sh-a failed: files q-qs-sh-a.O and $srcdir/q-qs-sh-a.X differ" 1>&2;
217 errors
=`expr $errors + 1` ;;
218 2) $echo "Test q-qs-sh-a may have failed." 1>&2;
219 $echo The
command "cmp q-qs-sh-a.O $srcdir/q-qs-sh-a.X" failed.
1>&2 ;
220 errors
=`expr $errors + 1` ;;
223 test -s q-qs-sh-a.E ||
rm -f q-qs-sh-a.E
224 filename_args
="$srcdir/q\a"
226 for arg
in $filename_args; do
227 if test -r $arg; then
228 basename_arg
=`echo $arg|sed 's,.*/,,'`
229 test -f $basename_arg ||
cp -a $arg .
232 new_filename_args
="$new_filename_args $arg"
234 filename_args
=$new_filename_args
236 $xx --quoting=c
$filename_args > q-qs-c.O
2> q-qs-c.E
238 if test $code != 0 ; then
239 $echo "Test q-qs-c failed: ../../src/ls return code $code differs from expected value 0" 1>&2
240 errors
=`expr $errors + 1`
242 cmp q-qs-c.O
$srcdir/q-qs-c.X
> /dev
/null
2>&1
244 0) if test "$VERBOSE" ; then $echo "passed q-qs-c"; fi ;;
245 1) $echo "Test q-qs-c failed: files q-qs-c.O and $srcdir/q-qs-c.X differ" 1>&2;
246 errors
=`expr $errors + 1` ;;
247 2) $echo "Test q-qs-c may have failed." 1>&2;
248 $echo The
command "cmp q-qs-c.O $srcdir/q-qs-c.X" failed.
1>&2 ;
249 errors
=`expr $errors + 1` ;;
252 test -s q-qs-c.E ||
rm -f q-qs-c.E
253 filename_args
="$srcdir/q\a"
255 for arg
in $filename_args; do
256 if test -r $arg; then
257 basename_arg
=`echo $arg|sed 's,.*/,,'`
258 test -f $basename_arg ||
cp -a $arg .
261 new_filename_args
="$new_filename_args $arg"
263 filename_args
=$new_filename_args
265 $xx --quoting=escape
$filename_args > q-qs-esc.O
2> q-qs-esc.E
267 if test $code != 0 ; then
268 $echo "Test q-qs-esc failed: ../../src/ls return code $code differs from expected value 0" 1>&2
269 errors
=`expr $errors + 1`
271 cmp q-qs-esc.O
$srcdir/q-qs-esc.X
> /dev
/null
2>&1
273 0) if test "$VERBOSE" ; then $echo "passed q-qs-esc"; fi ;;
274 1) $echo "Test q-qs-esc failed: files q-qs-esc.O and $srcdir/q-qs-esc.X differ" 1>&2;
275 errors
=`expr $errors + 1` ;;
276 2) $echo "Test q-qs-esc may have failed." 1>&2;
277 $echo The
command "cmp q-qs-esc.O $srcdir/q-qs-esc.X" failed.
1>&2 ;
278 errors
=`expr $errors + 1` ;;
281 test -s q-qs-esc.E ||
rm -f q-qs-esc.E
282 if test $errors = 0 ; then
283 $echo Passed all
9 tests.
1>&2
285 $echo Failed
$errors tests.
1>&2
287 test $errors = 0 || errors
=1