]> Dogcows Code - chaz/tar/commitdiff
Initial revision
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Jul 2003 20:13:29 +0000 (20:13 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 5 Jul 2003 20:13:29 +0000 (20:13 +0000)
tests/delete04.sh [new file with mode: 0755]
tests/multiv01.sh [new file with mode: 0755]
tests/options.sh [new file with mode: 0755]

diff --git a/tests/delete04.sh b/tests/delete04.sh
new file mode 100755 (executable)
index 0000000..4cdf030
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Deleting a large last member was destroying earlier members.
+
+. ./preset
+. $srcdir/before
+
+set -e
+genfile -l      3 >file1
+genfile -l      5 >file2
+genfile -l      3 >file3
+genfile -l      6 >file4
+genfile -l     24 >file5
+genfile -l     13 >file6
+genfile -l   1385 >file7
+genfile -l     30 >file8
+genfile -l     10 >file9
+genfile -l 256000 >file10
+tar cf archive file1 file2 file3 file4 file5 file6 file7 file8 file9 file10
+tar f archive --delete file10
+tar tf archive
+
+out="\
+file1
+file2
+file3
+file4
+file5
+file6
+file7
+file8
+file9
+"
+
+. $srcdir/after
diff --git a/tests/multiv01.sh b/tests/multiv01.sh
new file mode 100755 (executable)
index 0000000..3226f09
--- /dev/null
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Test multivolume dumps from pipes.
+
+. ./preset
+. $srcdir/before
+
+set -e
+
+dd if=/dev/zero bs=1024 count=7 >file1
+
+for block in " 1" " 2" " 3" " 4" " 5" " 6" " 7" " 8" \
+              " 9" "10" "11" "12" "13" "14" "15" "16" ; do \
+  echo "file2  block ${block} bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+  for count in 2 3 4 5 6 7 8 ; do
+    echo "bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla!bla"
+  done
+done >file2
+
+tar -c --multi-volume --tape-length=10 \
+  --listed-incremental=t.snar \
+  -f t1-pipe.tar -f t2-pipe.tar ./file1 ./file2
+
+mkdir extract-dir-pipe
+dd bs=4096 count=10 <t2-pipe.tar |
+PATH=$PATH truss -o /tmp/tr tar -f t1-pipe.tar -f - -C extract-dir-pipe -x --multi-volume \
+  --tape-length=10 --read-full-records
+
+cmp file1 extract-dir-pipe/file1
+cmp file2 extract-dir-pipe/file2
+
+out="\
+"
+err="\
+7+0 records in
+7+0 records out
+"
+
+. $srcdir/after
diff --git a/tests/options.sh b/tests/options.sh
new file mode 100755 (executable)
index 0000000..daa5e23
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+# Ensure that TAR_OPTIONS works in conjunction with old-style options.
+
+. ./preset
+. $srcdir/before
+
+set -e
+echo > file1
+TAR_OPTIONS=--numeric-owner tar chof archive file1
+tar tf archive
+
+out="\
+file1
+"
+
+. $srcdir/after
This page took 0.025006 seconds and 4 git commands to generate.