Thu, 22 Nov 2007 22:20:39 -0500
[svn] Refactor actions (extract the archive, vs. list the contents) into their
own classes, instead of having all that in the Application class. Also did
some similar fidgeting with the ExtractorBuilder. I like this better.
It's still not the cleanest API but things feel more manageable now.
Add 7z support.
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
1 | - name: basic .tar |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
2 | filenames: test-1.23.tar |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
3 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
4 | tar -xf $1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
5 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
6 | - name: basic .tar.gz |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
7 | filenames: test-1.23.tar.gz |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
8 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
9 | tar -zxf $1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
10 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
11 | - name: basic .tar.bz2 |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
12 | filenames: test-1.23.tar.bz2 |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
13 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
14 | mkdir test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
15 | cd test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
16 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
17 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
18 | - name: basic .zip |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
19 | filenames: test-1.23.zip |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
20 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
21 | mkdir test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
22 | cd test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
23 | unzip -q ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
24 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
25 | - name: basic .deb |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
26 | filenames: test-1.23_all.deb |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
27 | baseline: | |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
28 | mkdir test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
29 | cd test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
30 | ar p ../$1 data.tar.gz | tar -zx |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
31 | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
32 | - name: basic .gem |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
33 | filenames: test-1.23.gem |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
34 | baseline: | |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
35 | mkdir test-1.23 |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
36 | cd test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
37 | tar -xOf ../$1 data.tar.gz | tar -zx |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
38 | |
31
c3a2760d1c3a
[svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents:
30
diff
changeset
|
39 | - name: basic .7z |
c3a2760d1c3a
[svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents:
30
diff
changeset
|
40 | filenames: test-1.23.7z |
c3a2760d1c3a
[svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents:
30
diff
changeset
|
41 | baseline: | |
c3a2760d1c3a
[svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents:
30
diff
changeset
|
42 | 7z x $1 |
c3a2760d1c3a
[svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents:
30
diff
changeset
|
43 | |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
44 | - name: .deb metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
45 | filenames: test-1.23_all.deb |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
46 | options: --metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
47 | baseline: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
48 | mkdir test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
49 | cd test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
50 | ar p ../$1 control.tar.gz | tar -zx |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
51 | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
52 | - name: .gem metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
53 | filenames: test-1.23.gem |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
54 | options: -m |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
55 | baseline: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
56 | tar -xOf $1 metadata.gz | zcat > test-1.23.gem-metadata.txt |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
57 | cleanup: rm -f test-1.23.gem-metadata.txt |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
58 | posttest: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
59 | if [ "x`cat test-1.23.gem-metadata.txt`" != "xhi" ]; then exit 1; fi |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
60 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
61 | - name: recursion and permissions |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
62 | filenames: test-recursive-badperms.tar.bz2 |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
63 | options: -n -r |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
64 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
65 | mkdir test-recursive-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
66 | cd test-recursive-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
67 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
68 | mkdir test-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
69 | cd test-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
70 | tar -xf ../test-badperms.tar |
23
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
71 | chmod 700 testdir |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
72 | posttest: | |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
73 | if [ "x`cat test-recursive-badperms/test-badperms/testdir/testfile`" != \ |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
74 | "xhey" ]; then exit 1; fi |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
75 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
76 | - name: decompressing gz |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
77 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
78 | filenames: ../test-text.gz |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
79 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
80 | zcat $1 >test-text |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
81 | posttest: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
82 | if [ "x`cat test-text`" != "xhi" ]; then exit 1; fi |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
83 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
84 | - name: decompressing bz2 |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
85 | directory: inside-dir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
86 | filenames: ../test-text.bz2 |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
87 | baseline: | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
88 | bzcat $1 >test-text |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
89 | posttest: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
90 | if [ "x`cat test-text`" != "xhi" ]; then exit 1; fi |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
91 | |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
92 | - name: decompression with -r |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
93 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
94 | filenames: ../test-text.gz |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
95 | options: -n -r |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
96 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
97 | zcat $1 >test-text |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
98 | |
16
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
99 | - name: decompression with -fr |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
100 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
101 | filenames: ../test-text.gz |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
102 | options: -n -fr |
16
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
103 | baseline: | |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
104 | zcat $1 >test-text |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
105 | |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
106 | - name: overwrite protection |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
107 | filenames: test-1.23.tar.bz2 |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
108 | baseline: | |
30
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
109 | mkdir test-1.23.1 |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
110 | cd test-1.23.1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
111 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
112 | prerun: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
113 | mkdir test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
114 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
115 | - name: overwrite option |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
116 | filenames: test-1.23.tar.bz2 |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
117 | options: -n -o |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
118 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
119 | cd test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
120 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
121 | prerun: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
122 | mkdir test-1.23 |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
123 | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
124 | - name: flat option |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
125 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
126 | filenames: ../test-1.23.tar.bz2 |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
127 | options: -n -f |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
128 | baseline: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
129 | tar -jxf $1 |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
130 | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
131 | - name: flat recursion and permissions |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
132 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
133 | filenames: ../test-recursive-badperms.tar.bz2 |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
134 | options: -n -fr |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
135 | baseline: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
136 | tar -jxf $1 |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
137 | tar -xf test-badperms.tar |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
138 | chmod 700 testdir |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
139 | posttest: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
140 | if [ "x`cat testdir/testfile`" != "xhey" ]; then exit 1; fi |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
141 | |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
142 | - name: no files |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
143 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
144 | grep: "[Uu]sage" |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
145 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
146 | - name: bad file |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
147 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
148 | filenames: nonexistent-file.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
149 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
150 | - name: not an archive |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
151 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
152 | filenames: tests.yml |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
153 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
154 | - name: bad options |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
155 | options: -n --nonexistent-option |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
156 | filenames: test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
157 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
158 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
159 | - name: --version |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
160 | options: -n --version |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
161 | grep: ersion \d+\.\d+ |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
162 | filenames: test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
163 | baseline: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
164 | exit 0 |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
165 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
166 | - name: one good archive of many |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
167 | filenames: tests.yml test-1.23.tar nonexistent-file.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
168 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
169 | baseline: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
170 | tar -xf $2 |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
171 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
172 | - name: silence |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
173 | filenames: tests.yml |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
174 | options: -n -qq |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
175 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
176 | antigrep: . |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
177 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
178 | - name: can't write to directory |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
179 | directory: inside-dir |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
180 | filenames: ../test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
181 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
182 | grep: ERROR |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
183 | antigrep: Traceback |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
184 | prerun: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
185 | chmod 500 . |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
186 | |
19 | 187 | - name: list contents of one file |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
188 | options: -n -l |
19 | 189 | filenames: test-1.23.tar |
190 | output: | | |
191 | test-1.23/ | |
192 | test-1.23/1/ | |
193 | test-1.23/1/2/ | |
194 | test-1.23/1/2/3 | |
195 | test-1.23/a/ | |
196 | test-1.23/a/b | |
197 | test-1.23/foobar | |
198 | ||
199 | - name: list contents of multiple files | |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
200 | options: -n --table |
19 | 201 | filenames: test-1.23_all.deb test-1.23.zip |
202 | output: | | |
203 | test-1.23_all.deb: | |
204 | 1/ | |
205 | 1/2/ | |
206 | 1/2/3 | |
207 | a/ | |
208 | a/b | |
209 | foobar | |
210 | ||
211 | test-1.23.zip: | |
212 | 1/2/3 | |
213 | a/b | |
214 | foobar | |
215 | ||
216 | - name: list contents of compressed file | |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
217 | options: -n -t |
19 | 218 | filenames: test-text.gz |
219 | output: test-text | |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
220 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
221 | - name: default behavior with one directory (gz) |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
222 | options: -n |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
223 | filenames: test-onedir.tar.gz |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
224 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
225 | mkdir test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
226 | cd test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
227 | tar -zxf ../$1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
228 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
229 | - name: one directory extracted inside another (gz) |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
230 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
231 | filenames: test-onedir.tar.gz |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
232 | input: i |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
233 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
234 | mkdir test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
235 | cd test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
236 | tar -zxf ../$1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
237 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
238 | - name: one directory extracted with rename (gz) |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
239 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
240 | filenames: test-onedir.tar.gz |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
241 | input: r |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
242 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
243 | tar -zxf $1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
244 | mv test test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
245 | |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
246 | - name: one directory extracted here (gz) |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
247 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
248 | filenames: test-onedir.tar.gz |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
249 | input: h |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
250 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
251 | tar -zxf $1 |
21
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
252 | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
253 | - name: default behavior with one directory (bz2) |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
254 | options: -n |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
255 | filenames: test-onedir.tar.gz |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
256 | baseline: | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
257 | mkdir test-onedir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
258 | cd test-onedir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
259 | tar -zxf ../$1 |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
260 | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
261 | - name: one directory extracted inside another (bz2) |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
262 | options: "" |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
263 | filenames: test-onedir.tar.gz |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
264 | input: i |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
265 | baseline: | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
266 | mkdir test-onedir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
267 | cd test-onedir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
268 | tar -zxf ../$1 |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
269 | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
270 | - name: one directory extracted with rename (bz2) |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
271 | options: "" |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
272 | filenames: test-onedir.tar.gz |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
273 | input: r |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
274 | baseline: | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
275 | tar -zxf $1 |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
276 | mv test test-onedir |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
277 | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
278 | - name: one directory extracted here (bz2) |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
279 | options: "" |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
280 | filenames: test-onedir.tar.gz |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
281 | input: h |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
282 | baseline: | |
fd3e10410040
[svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents:
20
diff
changeset
|
283 | tar -zxf $1 |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
284 | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
285 | - name: bomb with preceding dot in the table |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
286 | filenames: test-dot-first-bomb.tar.gz |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
287 | options: "" |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
288 | antigrep: one entry |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
289 | baseline: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
290 | mkdir test-dot-first-bomb |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
291 | cd test-dot-first-bomb |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
292 | tar -zxf ../$1 |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
293 | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
294 | - name: one directory preceded by dot in the table |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
295 | filenames: test-dot-first-onedir.tar.gz |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
296 | options: "" |
28
4d88f2231d33
[svn] Change all the license notices from GPLv2 to GPLv3.
brett
parents:
23
diff
changeset
|
297 | grep: "one entry: (./)?dir/" |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
298 | input: h |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
299 | baseline: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
300 | tar -zxf $1 |
23
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
301 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
302 | - name: two one-item archives with different answers |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
303 | filenames: test-onedir.tar.gz test-onedir.tar.gz |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
304 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
305 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
306 | h |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
307 | r |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
308 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
309 | tar -zxf $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
310 | mv test test-onedir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
311 | tar -zxf $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
312 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
313 | - name: interactive recursion (always) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
314 | filenames: test-recursive-badperms.tar.bz2 test-recursive-badperms.tar.bz2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
315 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
316 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
317 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
318 | a |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
319 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
320 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
321 | extract() { |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
322 | mkdir test-recursive-badperms$2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
323 | cd test-recursive-badperms$2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
324 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
325 | mkdir test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
326 | cd test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
327 | tar -xf ../test-badperms.tar |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
328 | chmod 700 testdir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
329 | cd ../.. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
330 | } |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
331 | extract $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
332 | extract $1 .1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
333 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
334 | - name: interactive recursion (once) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
335 | filenames: test-recursive-badperms.tar.bz2 test-recursive-badperms.tar.bz2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
336 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
337 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
338 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
339 | o |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
340 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
341 | n |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
342 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
343 | mkdir test-recursive-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
344 | cd test-recursive-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
345 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
346 | mkdir test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
347 | cd test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
348 | tar -xf ../test-badperms.tar |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
349 | chmod 700 testdir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
350 | cd ../.. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
351 | mkdir test-recursive-badperms.1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
352 | cd test-recursive-badperms.1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
353 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
354 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
355 | - name: interactive recursion (never) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
356 | filenames: test-recursive-badperms.tar.bz2 test-recursive-badperms.tar.bz2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
357 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
358 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
359 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
360 | v |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
361 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
362 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
363 | extract() { |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
364 | mkdir test-recursive-badperms$2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
365 | cd test-recursive-badperms$2 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
366 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
367 | cd .. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
368 | } |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
369 | extract $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
370 | extract $1 .1 |
30
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
371 | |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
372 | - name: extracting file with bad extension |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
373 | filenames: test-1.23.bin |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
374 | prerun: cp ${1}test-1.23.tar.gz ${1}test-1.23.bin |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
375 | cleanup: rm -f ${1}test-1.23.bin |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
376 | baseline: | |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
377 | tar -zxf $1 |