aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-06-08 08:41:26 -0500
committerRob Landley <rob@landley.net>2020-06-08 08:41:26 -0500
commitba1a79fa0e7138cd9af4195aa5ebc79ed8ab307c (patch)
treee850b9c15eea881b6ae50e212c6d3bb8c6b38050
parent7fe1bdfb5fc05f344e1a8f0ce1c89aa7bfea9a08 (diff)
downloadtoybox-ba1a79fa0e7138cd9af4195aa5ebc79ed8ab307c.tar.gz
Add tar test for long filenames.
-rw-r--r--tests/files/tar/long_path.tarbin0 -> 1536 bytes
-rw-r--r--tests/tar.test11
2 files changed, 7 insertions, 4 deletions
diff --git a/tests/files/tar/long_path.tar b/tests/files/tar/long_path.tar
new file mode 100644
index 00000000..9bbc5411
--- /dev/null
+++ b/tests/files/tar/long_path.tar
Binary files differ
diff --git a/tests/tar.test b/tests/tar.test
index 523faa67..8ed400e9 100644
--- a/tests/tar.test
+++ b/tests/tar.test
@@ -105,7 +105,7 @@ ln dir/link dir/hlink
testing "create hardlink to symlink" "$TAR dir/link dir/hlink | SUM 3" \
"3bc16f8fb6fc8b05f691da8caf989a70ee99284a\n" "" ""
-skipnot mkfifo dir/fifo
+skipnot mkfifo dir/fifo 2>/dev/null
testing "create dir/fifo" "$TAR dir/fifo | SUM 3" \
"bd1365db6e8ead4c813333f9666994c1899924d9\n" "" ""
@@ -161,15 +161,15 @@ testing "manually specify bz2" 'LST -jf "$FILES"/tar/tar.tbz2' \
"drwxr-x--- enh/eng 0 2017-05-13 01:05 dir/\n-rw-r----- enh/eng 12 2017-05-13 01:05 dir/file\n" \
"" ""
-skipnot mknod dir/char c 12 34
+skipnot mknod dir/char c 12 34 2>/dev/null
testing "character special" "tar --mtime @0 -cf test.tar dir/char && rm -f dir/char && tar xf test.tar && ls -l dir/char" \
"crw-rw---- 1 root root 12, 34 1970-01-01 00:00 dir/char\n" "" ""
-skipnot mknod dir/block b 23 45
+skipnot mknod dir/block b 23 45 2>/dev/null
testing "block special" "tar --mtime @0 -cf test.tar dir/block && rm -f dir/block && tar xf test.tar && ls -l dir/block" \
"brw-rw---- 1 root root 23, 45 1970-01-01 00:00 dir/block\n" "" ""
-skipnot chown nobody dir/file
+skipnot chown nobody dir/file 2>/dev/null
testing "ownership" "$TAR dir/file | SUM 3" \
"2d7b96c7025987215f5a41f10eaa84311160afdb\n" "" ""
@@ -247,6 +247,9 @@ testing "sparse extract hole at end" \
"791060574c569e5c059e2b90c1961a3575898f97\n" "" ""
rm fweep2 fweep2.tar
+testcmd "longname" "tf $FILES/tar/long_path.tar" \
+ "$(printf 'long file name%86cTRAILING' ' ' | tr ' ' _)\n" "" ""
+
if false
then