diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-02 18:06:39 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-02 18:06:39 +0000 |
commit | e78a54bc5a4495253aecd3b3f95854d6bc4e2794 (patch) | |
tree | a36532902ee738627158ffe21c85a73b319a851c /tests/misc | |
parent | 55277831b2226a64b73f098be1c61f669e526042 (diff) | |
download | coreutils-e78a54bc5a4495253aecd3b3f95854d6bc4e2794.tar.xz |
*** empty log message ***
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/false | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/misc/false b/tests/misc/false new file mode 100755 index 000000000..2d85bb56c --- /dev/null +++ b/tests/misc/false @@ -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 |