Exit 77 when run as root. Reported by Andreas Schwab.
authorJim Meyering <jim@meyering.net>
Tue, 23 May 2000 21:13:28 +0000 (21:13 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 23 May 2000 21:13:28 +0000 (21:13 +0000)
tests/mv/i-2

index 40e229fc4e15223e83d67068de7100a18988d7db..4113d9fdfc7b96c3e26e26ccacd37994618918dc 100755 (executable)
@@ -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