summaryrefslogtreecommitdiff
path: root/testsuite/tar
diff options
context:
space:
mode:
authorMatt Kraai2001-10-30 23:11:20 +0000
committerMatt Kraai2001-10-30 23:11:20 +0000
commit3889078dbe09a9d85b359e9c0c0c225e0bbea343 (patch)
treee258582c0f14f06750e480e2c244260e79860fd0 /testsuite/tar
parent999623e9736d21177d1f437679b334e0347a6e0f (diff)
downloadbusybox-3889078dbe09a9d85b359e9c0c0c225e0bbea343.zip
busybox-3889078dbe09a9d85b359e9c0c0c225e0bbea343.tar.gz
Merge test suite.
Diffstat (limited to 'testsuite/tar')
-rw-r--r--testsuite/tar/tar-demands-at-least-one-ctx5
-rw-r--r--testsuite/tar/tar-demands-at-most-one-ctx5
-rw-r--r--testsuite/tar/tar-extracts-file5
-rw-r--r--testsuite/tar/tar-extracts-multiple-files5
-rw-r--r--testsuite/tar/tar-handles-cz-options4
-rw-r--r--testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list4
-rw-r--r--testsuite/tar/tar-handles-exclude-and-extract-lists6
-rw-r--r--testsuite/tar/tar-handles-multiple-X-options8
-rw-r--r--testsuite/tar/tar-handles-nested-exclude7
9 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/tar/tar-demands-at-least-one-ctx b/testsuite/tar/tar-demands-at-least-one-ctx
new file mode 100644
index 0000000..3ac58e8
--- /dev/null
+++ b/testsuite/tar/tar-demands-at-least-one-ctx
@@ -0,0 +1,5 @@
+if busybox tar v; then
+ return 1
+else
+ return 0
+fi
diff --git a/testsuite/tar/tar-demands-at-most-one-ctx b/testsuite/tar/tar-demands-at-most-one-ctx
new file mode 100644
index 0000000..be21681
--- /dev/null
+++ b/testsuite/tar/tar-demands-at-most-one-ctx
@@ -0,0 +1,5 @@
+if busybox tar tx; then
+ return 1
+else
+ return 0
+fi
diff --git a/testsuite/tar/tar-extracts-file b/testsuite/tar/tar-extracts-file
new file mode 100644
index 0000000..ca72f24
--- /dev/null
+++ b/testsuite/tar/tar-extracts-file
@@ -0,0 +1,5 @@
+touch foo
+tar cf foo.tar foo
+rm foo
+busybox tar xf foo.tar
+test -f foo
diff --git a/testsuite/tar/tar-extracts-multiple-files b/testsuite/tar/tar-extracts-multiple-files
new file mode 100644
index 0000000..e26901e
--- /dev/null
+++ b/testsuite/tar/tar-extracts-multiple-files
@@ -0,0 +1,5 @@
+touch foo bar
+tar cf foo.tar foo bar
+rm foo bar
+busybox tar xf foo.tar
+test -f foo -a -f bar
diff --git a/testsuite/tar/tar-handles-cz-options b/testsuite/tar/tar-handles-cz-options
new file mode 100644
index 0000000..b2806bb
--- /dev/null
+++ b/testsuite/tar/tar-handles-cz-options
@@ -0,0 +1,4 @@
+# XFAIL
+touch foo
+busybox tar czf foo.tar.gz foo
+gzip -d foo.tar.gz
diff --git a/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list b/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
new file mode 100644
index 0000000..cf0e4c9
--- /dev/null
+++ b/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
@@ -0,0 +1,4 @@
+touch foo
+tar cf foo.tar foo
+echo foo >foo.exclude
+busybox tar xf foo.tar -X foo.exclude
diff --git a/testsuite/tar/tar-handles-exclude-and-extract-lists b/testsuite/tar/tar-handles-exclude-and-extract-lists
new file mode 100644
index 0000000..7f771b9
--- /dev/null
+++ b/testsuite/tar/tar-handles-exclude-and-extract-lists
@@ -0,0 +1,6 @@
+touch foo bar baz
+tar cf foo.tar foo bar baz
+echo foo >foo.exclude
+rm foo bar baz
+busybox tar xf foo.tar foo bar -X foo.exclude
+test ! -f foo -a -f bar -a ! -f baz
diff --git a/testsuite/tar/tar-handles-multiple-X-options b/testsuite/tar/tar-handles-multiple-X-options
new file mode 100644
index 0000000..8321af8
--- /dev/null
+++ b/testsuite/tar/tar-handles-multiple-X-options
@@ -0,0 +1,8 @@
+touch foo
+touch bar
+tar cf foo.tar foo bar
+echo foo > foo.exclude
+echo bar > bar.exclude
+rm foo bar
+busybox tar xf foo.tar -X foo.exclude -X bar.exclude
+test ! -f foo -a ! -f bar
diff --git a/testsuite/tar/tar-handles-nested-exclude b/testsuite/tar/tar-handles-nested-exclude
new file mode 100644
index 0000000..da18408
--- /dev/null
+++ b/testsuite/tar/tar-handles-nested-exclude
@@ -0,0 +1,7 @@
+mkdir foo
+touch foo/bar
+tar cf foo.tar foo
+rm -rf foo
+echo foo/bar >foobar.exclude
+busybox tar xf foo.tar foo -X foobar.exclude
+test -d foo -a ! -f foo/bar