find:: get rid of nested function (it's a gcc-ism)
[oweals/busybox.git] / testsuite / cpio.tests
index 5b397b01cfcf521d281afd856e85ee1c2eff25a8..4cd441a60db48cb4e1587da41e52c9444c14b384 100755 (executable)
@@ -1,9 +1,11 @@
 #!/bin/sh
 # Copyright 2008 by Denys Vlasenko
-# Licensed under GPL v2, see file LICENSE for details.
+# Licensed under GPLv2, see file LICENSE in this source tree.
 
 . ./testing.sh
 
+umask 022
+
 # ls -ln shows date. Need to remove that, it's variable.
 # sed: coalesce spaces
 # cut: remove date
@@ -99,7 +101,7 @@ SKIP=
 
 # chown on a link was affecting file, dropping its suid/sgid bits
 rm -rf cpio.testdir
-optional FEATURE_CPIO_O
+optional FEATURE_CPIO_O FEATURE_STAT_FORMAT
 mkdir cpio.testdir
 touch cpio.testdir/file
 chmod 6755 cpio.testdir/file  # sets suid/sgid bits
@@ -114,6 +116,16 @@ link
 " "" ""
 SKIP=
 
+# avoid 'not created: newer or same age file exists' message for directories
+rm -rf cpio.testdir cpio.testdir2 2>/dev/null
+mkdir cpio.testdir
+testing "cpio extracts in existing directory" \
+"$ECHO -ne '$hexdump' | bzcat | cpio -id 2>&1; echo \$?" \
+"\
+1 blocks
+0
+" "" ""
+SKIP=
 
 # Clean up
 rm -rf cpio.testdir cpio.testdir2 2>/dev/null