]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: Fixup shred-passes test
authorPádraig Brady <P@draigBrady.com>
Wed, 28 Jan 2009 16:42:20 +0000 (16:42 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 28 Jan 2009 16:43:52 +0000 (16:43 +0000)
* tests/misc/shred-passes: Set the $fail variable correctly.
The issue was noticed by Jim Meyering.

tests/misc/shred-passes

index 07823b109df5402d2db606754abd0f3926a02775..712c7bd670aba43cad4f8c1334c49a2e066d9ee7 100755 (executable)
@@ -23,6 +23,7 @@ fi
 
 . $srcdir/test-lib.sh
 
+
 # shred a single letter, zero length file which should result in
 # 3 random passes and a single rename.
 touch f || framework_failure
@@ -32,10 +33,12 @@ shred: f: pass 2/3 (random)...
 shred: f: pass 3/3 (random)...
 shred: f: removing
 shred: f: renamed to 0
-shred: f: removed" > exp
+shred: f: removed" > exp || framework_failure
+
+fail=0
 
-shred -v -u f 2>out
+shred -v -u f 2>out || fail=1
 
-compare exp out || fail
+compare exp out || fail=1
 
 Exit $fail