diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-06-05 20:05:00 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-06-05 20:05:00 +0000 |
commit | 856e93df7667578d7a425e1ab6da71c113954f97 (patch) | |
tree | 8e768d8f0353c45269f1fcdbca1dc8c19e89f4ec /tests/misc/false-status | |
parent | 8818e69748b0cbf4d0c63d4ca770aa4e7b2a1b8d (diff) | |
download | coreutils-856e93df7667578d7a425e1ab6da71c113954f97.tar.xz |
Rename file to avoid bugs with VPATH builds and Solaris 'make'.
Diffstat (limited to 'tests/misc/false-status')
-rwxr-xr-x | tests/misc/false-status | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/misc/false-status b/tests/misc/false-status new file mode 100755 index 000000000..2d85bb56c --- /dev/null +++ b/tests/misc/false-status @@ -0,0 +1,28 @@ +#!/bin/sh +# ensure that false exits nonzero even with --help or --version + +if test "$VERBOSE" = yes; then + set -x + false --version +fi + +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 && exit $status' 0 +trap '(exit $?); exit $?' 1 2 13 15 + +framework_failure=0 +mkdir -p $tmp || framework_failure=1 +cd $tmp || framework_failure=1 + +if test $framework_failure = 1; then + echo "$0: failure in testing framework" 1>&2 + (exit 1); exit 1 +fi + +fail=0 + +false --version > /dev/null && fail=1 +false --help > /dev/null && fail=1 + +(exit $fail); exit $fail |