summaryrefslogtreecommitdiff
path: root/polux/application/busybox/testsuite/tar
diff options
context:
space:
mode:
Diffstat (limited to 'polux/application/busybox/testsuite/tar')
-rw-r--r--polux/application/busybox/testsuite/tar/tar-archives-multiple-files6
-rw-r--r--polux/application/busybox/testsuite/tar/tar-complains-about-missing-file3
-rw-r--r--polux/application/busybox/testsuite/tar/tar-demands-at-least-one-ctx1
-rw-r--r--polux/application/busybox/testsuite/tar/tar-demands-at-most-one-ctx1
-rw-r--r--polux/application/busybox/testsuite/tar/tar-extracts-all-subdirs12
-rw-r--r--polux/application/busybox/testsuite/tar/tar-extracts-file5
-rw-r--r--polux/application/busybox/testsuite/tar/tar-extracts-from-standard-input5
-rw-r--r--polux/application/busybox/testsuite/tar/tar-extracts-multiple-files6
-rw-r--r--polux/application/busybox/testsuite/tar/tar-extracts-to-standard-output3
-rw-r--r--polux/application/busybox/testsuite/tar/tar-handles-cz-options5
-rw-r--r--polux/application/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list6
-rw-r--r--polux/application/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists8
-rw-r--r--polux/application/busybox/testsuite/tar/tar-handles-multiple-X-options10
-rw-r--r--polux/application/busybox/testsuite/tar/tar-handles-nested-exclude9
14 files changed, 80 insertions, 0 deletions
diff --git a/polux/application/busybox/testsuite/tar/tar-archives-multiple-files b/polux/application/busybox/testsuite/tar/tar-archives-multiple-files
new file mode 100644
index 0000000000..245d9e9892
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-archives-multiple-files
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+touch foo bar
+busybox tar cf foo.tar foo bar
+rm foo bar
+tar xf foo.tar
+test -f foo -a -f bar
diff --git a/polux/application/busybox/testsuite/tar/tar-complains-about-missing-file b/polux/application/busybox/testsuite/tar/tar-complains-about-missing-file
new file mode 100644
index 0000000000..26e8cbb360
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-complains-about-missing-file
@@ -0,0 +1,3 @@
+touch foo
+tar cf foo.tar foo
+! busybox tar xf foo.tar bar
diff --git a/polux/application/busybox/testsuite/tar/tar-demands-at-least-one-ctx b/polux/application/busybox/testsuite/tar/tar-demands-at-least-one-ctx
new file mode 100644
index 0000000000..85e7f60599
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-demands-at-least-one-ctx
@@ -0,0 +1 @@
+! busybox tar v
diff --git a/polux/application/busybox/testsuite/tar/tar-demands-at-most-one-ctx b/polux/application/busybox/testsuite/tar/tar-demands-at-most-one-ctx
new file mode 100644
index 0000000000..130d0e7f91
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-demands-at-most-one-ctx
@@ -0,0 +1 @@
+! busybox tar tx
diff --git a/polux/application/busybox/testsuite/tar/tar-extracts-all-subdirs b/polux/application/busybox/testsuite/tar/tar-extracts-all-subdirs
new file mode 100644
index 0000000000..886c37ce9e
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-extracts-all-subdirs
@@ -0,0 +1,12 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+mkdir -p foo/{1,2,3}
+mkdir -p foo/1/{10,11}
+mkdir -p foo/1/10/{100,101,102}
+tar cf foo.tar -C foo .
+rm -rf foo/*
+busybox tar xf foo.tar -C foo ./1/10
+find foo | sort >logfile.bb
+rm -rf foo/*
+tar xf foo.tar -C foo ./1/10
+find foo | sort >logfile.gnu
+cmp logfile.gnu logfile.bb
diff --git a/polux/application/busybox/testsuite/tar/tar-extracts-file b/polux/application/busybox/testsuite/tar/tar-extracts-file
new file mode 100644
index 0000000000..ca72f24890
--- /dev/null
+++ b/polux/application/busybox/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/polux/application/busybox/testsuite/tar/tar-extracts-from-standard-input b/polux/application/busybox/testsuite/tar/tar-extracts-from-standard-input
new file mode 100644
index 0000000000..a30e9f0b9a
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-extracts-from-standard-input
@@ -0,0 +1,5 @@
+touch foo
+tar cf foo.tar foo
+rm foo
+cat foo.tar | busybox tar x
+test -f foo
diff --git a/polux/application/busybox/testsuite/tar/tar-extracts-multiple-files b/polux/application/busybox/testsuite/tar/tar-extracts-multiple-files
new file mode 100644
index 0000000000..7897d81d26
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-extracts-multiple-files
@@ -0,0 +1,6 @@
+touch foo bar
+tar cf foo.tar foo bar
+rm foo bar
+busybox tar -xf foo.tar
+test -f foo
+test -f bar
diff --git a/polux/application/busybox/testsuite/tar/tar-extracts-to-standard-output b/polux/application/busybox/testsuite/tar/tar-extracts-to-standard-output
new file mode 100644
index 0000000000..ca48e364e3
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-extracts-to-standard-output
@@ -0,0 +1,3 @@
+echo foo > foo
+tar cf foo.tar foo
+cat foo.tar | busybox tar Ox | cmp foo -
diff --git a/polux/application/busybox/testsuite/tar/tar-handles-cz-options b/polux/application/busybox/testsuite/tar/tar-handles-cz-options
new file mode 100644
index 0000000000..5b55e46d36
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-handles-cz-options
@@ -0,0 +1,5 @@
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+# FEATURE: CONFIG_FEATURE_TAR_GZIP
+touch foo
+busybox tar czf foo.tar.gz foo
+gzip -d foo.tar.gz
diff --git a/polux/application/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list b/polux/application/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
new file mode 100644
index 0000000000..503364230d
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list
@@ -0,0 +1,6 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+touch foo
+tar cf foo.tar foo
+echo foo >foo.exclude
+busybox tar xf foo.tar -X foo.exclude
diff --git a/polux/application/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists b/polux/application/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists
new file mode 100644
index 0000000000..2de0f0e91f
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists
@@ -0,0 +1,8 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+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/polux/application/busybox/testsuite/tar/tar-handles-multiple-X-options b/polux/application/busybox/testsuite/tar/tar-handles-multiple-X-options
new file mode 100644
index 0000000000..155b27e682
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-handles-multiple-X-options
@@ -0,0 +1,10 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+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/polux/application/busybox/testsuite/tar/tar-handles-nested-exclude b/polux/application/busybox/testsuite/tar/tar-handles-nested-exclude
new file mode 100644
index 0000000000..39013a1054
--- /dev/null
+++ b/polux/application/busybox/testsuite/tar/tar-handles-nested-exclude
@@ -0,0 +1,9 @@
+# FEATURE: CONFIG_FEATURE_TAR_FROM
+# FEATURE: CONFIG_FEATURE_TAR_CREATE
+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