summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-09-15 11:18:40 +0000
committerJim Meyering <jim@meyering.net>2001-09-15 11:18:40 +0000
commit2b87d03f50d5c9926b5ebf992ddbe50f325b8c38 (patch)
tree6133bed31f0375e591cc23af9bce2dfb9569b366 /tests
parent836ab0b6f70dd2e3111ae0bb536fffb15386d995 (diff)
downloadcoreutils-2b87d03f50d5c9926b5ebf992ddbe50f325b8c38.tar.xz
Clean up: use priv-check rather than open-coding it.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/mv/i-212
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index 72f26ed9a..82cce5710 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -13,6 +13,8 @@ fi
# Make sure we get English translations.
. $srcdir/../lang-default
+PRIV_CHECK_ARG=require-non-root . $srcdir/../priv-check
+
pwd=`pwd`
tmp=cp-mv-if-$$
trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0
@@ -22,16 +24,6 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp || framework_failure=1
-touch file || framework_failure=1
-chmod u-w file || framework_failure=1
-(echo foo >> file) >/dev/null 2>&1 && {
- echo '********************************************'
- echo "$0: NOTICE: This test case cannot be run as root."
- echo '********************************************'
- exit 77
-}
-
-
for i in a b c d e f g h; do
echo $i > $i || framework_failure=1
done