*** empty log message ***
[coreutils.git] / tests / misc / false
blob2d85bb56cf70e9ea22d1cd74829d4117a9a6efce
1 #!/bin/sh
2 # ensure that false exits nonzero even with --help or --version
4 if test "$VERBOSE" = yes; then
5 set -x
6 false --version
7 fi
9 pwd=`pwd`
10 t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
11 trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0
12 trap '(exit $?); exit $?' 1 2 13 15
14 framework_failure=0
15 mkdir -p $tmp || framework_failure=1
16 cd $tmp || framework_failure=1
18 if test $framework_failure = 1; then
19 echo "$0: failure in testing framework" 1>&2
20 (exit 1); exit 1
23 fail=0
25 false --version > /dev/null && fail=1
26 false --help > /dev/null && fail=1
28 (exit $fail); exit $fail