diff options
author | Jim Meyering <jim@meyering.net> | 2002-04-19 22:41:59 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-04-19 22:41:59 +0000 |
commit | 0129239343f6dd4daa3fae1ebf5be071f6317e86 (patch) | |
tree | 49c9979723b1325e847170d5fce166809fff4611 /tests | |
parent | 92d76e1e92f98b2aadacdd668ebd9ce932fe7d82 (diff) | |
download | coreutils-0129239343f6dd4daa3fae1ebf5be071f6317e86.tar.xz |
upgrade to use better framework
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cp/no-deref-link1 | 17 | ||||
-rwxr-xr-x | tests/cp/no-deref-link2 | 17 | ||||
-rwxr-xr-x | tests/cp/no-deref-link3 | 17 |
3 files changed, 42 insertions, 9 deletions
diff --git a/tests/cp/no-deref-link1 b/tests/cp/no-deref-link1 index 0d9d462fc..24246b6f8 100755 --- a/tests/cp/no-deref-link1 +++ b/tests/cp/no-deref-link1 @@ -7,7 +7,20 @@ if test "$VERBOSE" = yes; then cp --version fi -rm -rf a b +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; 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 +fi + mkdir a b msg=bar echo $msg > a/foo @@ -26,6 +39,4 @@ test $? = 1 || fail=1 test "`cat a/foo`" = $msg || fail=1 -rm -rf a b - (exit $fail); exit diff --git a/tests/cp/no-deref-link2 b/tests/cp/no-deref-link2 index 6af843d00..766318364 100755 --- a/tests/cp/no-deref-link2 +++ b/tests/cp/no-deref-link2 @@ -7,7 +7,20 @@ if test "$VERBOSE" = yes; then cp --version fi -rm -rf a b +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; 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 +fi + mkdir b msg=bar echo $msg > a @@ -26,6 +39,4 @@ test $? = 1 || fail=1 test "`cat a`" = $msg || fail=1 -rm -rf a b - (exit $fail); exit diff --git a/tests/cp/no-deref-link3 b/tests/cp/no-deref-link3 index 9ad685f7a..370803f7b 100755 --- a/tests/cp/no-deref-link3 +++ b/tests/cp/no-deref-link3 @@ -7,7 +7,20 @@ if test "$VERBOSE" = yes; then cp --version fi -rm -rf a b +pwd=`pwd` +t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$ +trap 'status=$?; cd $pwd; 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 +fi + msg=bar echo $msg > a ln -s a b @@ -23,6 +36,4 @@ test $? = 1 || fail=1 test "`cat a`" = $msg || fail=1 -rm -f a b - (exit $fail); exit |