diff options
Diffstat (limited to 'tests/rm/i-never')
-rwxr-xr-x | tests/rm/i-never | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/tests/rm/i-never b/tests/rm/i-never index c70e3eadf..16edcf6f7 100755 --- a/tests/rm/i-never +++ b/tests/rm/i-never @@ -22,30 +22,17 @@ if test "$VERBOSE" = yes; then rm --version fi -PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check - -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 -touch f || framework_failure=1 -chmod 0 f || framework_failure=1 -touch exp || framework_failure=1 - -if test $framework_failure = 1; then - echo "$0: failure in testing framework" 1>&2 - (exit 1); exit 1 -fi +. $srcdir/../test-lib.sh +skip_if_root_ + +touch f || framework_failure +chmod 0 f || framework_failure +touch exp || framework_failure fail=0 rm --interactive=never f > out || fail=1 -cmp out exp || fail=1 -test $fail = 1 && diff out exp 2> /dev/null +compare out exp || fail=1 (exit $fail); exit $fail |