aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-04-17 05:54:36 -0500
committerRob Landley <rob@landley.net>2021-04-17 05:54:36 -0500
commit95a15d238120167959bd7aee3e71ac5be3a72804 (patch)
treecbf37c21f822542971b1c916e1f36be25a1a3116 /tests
parentdafb9211c77788d7ea124aca18205e924d1ac48a (diff)
downloadtoybox-95a15d238120167959bd7aee3e71ac5be3a72804.tar.gz
Teach cpio to skip runs of NUL bytes between records.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cpio.test2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cpio.test b/tests/cpio.test
index 3955800f..9d9d9ba9 100755
--- a/tests/cpio.test
+++ b/tests/cpio.test
@@ -58,6 +58,8 @@ testing "-i keeps existing files" "echo new >a/b && cpio -i <a.cpio 2>/dev/null;
testing "-id keeps existing files" "echo new >a/b && cpio -id <a.cpio 2>/dev/null; cat a/b" "new\n" "" ""
testing "-iu replaces existing files; no error" "echo new >a/b && cpio -iu <a.cpio && cat a/b" "old\n" "" ""
testing "-idu replaces existing files; no error" "echo new >a/b && cpio -idu <a.cpio && cat a/b" "old\n" "" ""
+testing "skip NUL" "for i in a b; do dd if=/dev/zero bs=512 count=1 2>/dev/null; cat a.cpio; done | cpio -t -H newc" \
+ "a\na/b\na\na/b\n" "" ""
rm -rf a a.cpio
testing "error on empty file" \