Ensure that $? is 0 for the final `exit 0'.
authorJim Meyering <jim@meyering.net>
Fri, 1 Aug 2003 22:33:04 +0000 (22:33 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 1 Aug 2003 22:33:04 +0000 (22:33 +0000)
Otherwise, with at least the /bin/sh from HPUX 10.20,
the trap code would end up converting that to exit 1 and thus an
unexpected test failure.  Reported by Christian Krackowizer.

tests/shred/remove

index 5f250811363748eb67b1d93d27bdff6caac765ac..32a53f94168d5142b9fb3a7d7b2faeb988fb3970 100755 (executable)
@@ -34,6 +34,6 @@ fail=0
 # This would take so long that it appears to infloop
 # when using version from fileutils-4.0k.
 # When the command completes, expect it to fail.
-shred -u $file > /dev/null 2>&1 && fail=1
+shred -u $file > /dev/null 2>&1 && fail=1 || :
 
 exit $fail