diff options
Diffstat (limited to 'busybox/testsuite/tar')
13 files changed, 68 insertions, 0 deletions
diff --git a/busybox/testsuite/tar/tar-archives-multiple-files b/busybox/testsuite/tar/tar-archives-multiple-files new file mode 100644 index 0000000..245d9e9 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-complains-about-missing-file b/busybox/testsuite/tar/tar-complains-about-missing-file new file mode 100644 index 0000000..26e8cbb --- /dev/null +++ b/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/busybox/testsuite/tar/tar-demands-at-least-one-ctx b/busybox/testsuite/tar/tar-demands-at-least-one-ctx new file mode 100644 index 0000000..85e7f60 --- /dev/null +++ b/busybox/testsuite/tar/tar-demands-at-least-one-ctx @@ -0,0 +1 @@ +! busybox tar v diff --git a/busybox/testsuite/tar/tar-demands-at-most-one-ctx b/busybox/testsuite/tar/tar-demands-at-most-one-ctx new file mode 100644 index 0000000..130d0e7 --- /dev/null +++ b/busybox/testsuite/tar/tar-demands-at-most-one-ctx @@ -0,0 +1 @@ +! busybox tar tx diff --git a/busybox/testsuite/tar/tar-extracts-file b/busybox/testsuite/tar/tar-extracts-file new file mode 100644 index 0000000..ca72f24 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-extracts-from-standard-input b/busybox/testsuite/tar/tar-extracts-from-standard-input new file mode 100644 index 0000000..a30e9f0 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-extracts-multiple-files b/busybox/testsuite/tar/tar-extracts-multiple-files new file mode 100644 index 0000000..8ae8cdd --- /dev/null +++ b/busybox/testsuite/tar/tar-extracts-multiple-files @@ -0,0 +1,6 @@ +touch foo bar +busybox tar cf foo.tar foo bar +rm foo bar +busybox tar -xf foo.tar +test -f foo +test -f bar diff --git a/busybox/testsuite/tar/tar-extracts-to-standard-output b/busybox/testsuite/tar/tar-extracts-to-standard-output new file mode 100644 index 0000000..ca48e36 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-handles-cz-options b/busybox/testsuite/tar/tar-handles-cz-options new file mode 100644 index 0000000..5b55e46 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list b/busybox/testsuite/tar/tar-handles-empty-include-and-non-empty-exclude-list new file mode 100644 index 0000000..5033642 --- /dev/null +++ b/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/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists b/busybox/testsuite/tar/tar-handles-exclude-and-extract-lists new file mode 100644 index 0000000..2de0f0e --- /dev/null +++ b/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/busybox/testsuite/tar/tar-handles-multiple-X-options b/busybox/testsuite/tar/tar-handles-multiple-X-options new file mode 100644 index 0000000..155b27e --- /dev/null +++ b/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/busybox/testsuite/tar/tar-handles-nested-exclude b/busybox/testsuite/tar/tar-handles-nested-exclude new file mode 100644 index 0000000..39013a1 --- /dev/null +++ b/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 |