summaryrefslogtreecommitdiff
path: root/tests/mv/i-2
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-23 21:13:28 +0000
committerJim Meyering <jim@meyering.net>2000-05-23 21:13:28 +0000
commitdfdfbc22b38f765b3bff199619eaaf0385ef481c (patch)
tree3f307692d9ae106a53dd4ea2ebb3fa66a723e070 /tests/mv/i-2
parent5f3b8f3038bce02b3f3f3ade272cec52f7d639b6 (diff)
downloadcoreutils-dfdfbc22b38f765b3bff199619eaaf0385ef481c.tar.xz
Exit 77 when run as root. Reported by Andreas Schwab.
Diffstat (limited to 'tests/mv/i-2')
-rwxr-xr-xtests/mv/i-210
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/mv/i-2 b/tests/mv/i-2
index 40e229fc4..4113d9fdf 100755
--- a/tests/mv/i-2
+++ b/tests/mv/i-2
@@ -32,6 +32,16 @@ framework_failure=0
mkdir $tmp || framework_failure=1
cd $tmp
+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