Sun, 20 Jan 2008 01:59:42 -0500
[svn] Fix various bugs in the recursive extraction.
First, 5.0 introduced a regression where it wouldn't find archives hidden
in subdirectories. So fix that.
Then recursive extraction would get confused if the archive was a ONE_ENTRY
and we decided to wrap it or just extract it here. Fix that too: the
extractor keeps track of where it thinks it's extracting to, and then the
handler will change that if necessary.
There are unit tests for all this.
I twiddled some other small thing while I was at it but now I forget what.
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 | |
34
a8f875e02c83
[svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents:
33
diff
changeset
|
44 | - name: basic .lzma |
a8f875e02c83
[svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents:
33
diff
changeset
|
45 | filenames: test-1.23.tar.lzma |
a8f875e02c83
[svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents:
33
diff
changeset
|
46 | baseline: | |
a8f875e02c83
[svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents:
33
diff
changeset
|
47 | lzcat $1 | tar -x |
a8f875e02c83
[svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents:
33
diff
changeset
|
48 | |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
49 | - name: .deb metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
50 | 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
|
51 | options: --metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
52 | baseline: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
53 | mkdir test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
54 | cd test-1.23 |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
55 | 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
|
56 | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
57 | - name: .gem metadata |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
58 | filenames: test-1.23.gem |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
59 | options: -m |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
60 | baseline: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
61 | 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
|
62 | 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
|
63 | posttest: | |
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
64 | 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
|
65 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
66 | - name: recursion and permissions |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
67 | 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
|
68 | options: -n -r |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
69 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
70 | mkdir test-recursive-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
71 | cd test-recursive-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
72 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
73 | mkdir test-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
74 | cd test-badperms |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
75 | 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
|
76 | chmod 700 testdir |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
77 | posttest: | |
29
5fad99c17221
[svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents:
28
diff
changeset
|
78 | 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
|
79 | "xhey" ]; then exit 1; fi |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
80 | |
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
|
81 | - name: decompressing gz |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
82 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
83 | filenames: ../test-text.gz |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
84 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
85 | 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
|
86 | posttest: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
87 | 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
|
88 | |
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
|
89 | - 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
|
90 | 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
|
91 | 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
|
92 | 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
|
93 | 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
|
94 | posttest: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
95 | 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
|
96 | |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
97 | - name: decompression with -r |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
98 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
99 | 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
|
100 | options: -n -r |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
101 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
102 | zcat $1 >test-text |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
103 | |
16
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
104 | - name: decompression with -fr |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
105 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
106 | 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
|
107 | options: -n -fr |
16
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
108 | baseline: | |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
109 | zcat $1 >test-text |
29794d4d41aa
[svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents:
15
diff
changeset
|
110 | |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
111 | - name: overwrite protection |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
112 | 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
|
113 | 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
|
114 | mkdir test-1.23.1 |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
115 | cd test-1.23.1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
116 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
117 | prerun: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
118 | mkdir test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
119 | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
120 | - name: overwrite option |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
121 | 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
|
122 | options: -n -o |
14
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
123 | baseline: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
124 | cd test-1.23 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
125 | tar -jxf ../$1 |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
126 | prerun: | |
6f9e1bb59719
[svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff
changeset
|
127 | 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
|
128 | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
129 | - name: flat option |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
130 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
131 | 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
|
132 | options: -n -f |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
133 | baseline: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
134 | tar -jxf $1 |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
135 | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
136 | - 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
|
137 | directory: inside-dir |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
138 | 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
|
139 | options: -n -fr |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
140 | baseline: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
141 | tar -jxf $1 |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
142 | 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
|
143 | chmod 700 testdir |
15
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
144 | posttest: | |
28dbd52a8bb8
[svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents:
14
diff
changeset
|
145 | 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
|
146 | |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
147 | - name: no files |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
148 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
149 | grep: "[Uu]sage" |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
150 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
151 | - name: bad file |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
152 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
153 | filenames: nonexistent-file.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
154 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
155 | - name: not an archive |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
156 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
157 | filenames: tests.yml |
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: bad options |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
160 | options: -n --nonexistent-option |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
161 | filenames: test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
162 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
163 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
164 | - name: --version |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
165 | options: -n --version |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
166 | grep: ersion \d+\.\d+ |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
167 | filenames: test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
168 | baseline: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
169 | exit 0 |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
170 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
171 | - 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
|
172 | 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
|
173 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
174 | baseline: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
175 | tar -xf $2 |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
176 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
177 | - name: silence |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
178 | filenames: tests.yml |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
179 | options: -n -qq |
17
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
180 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
181 | antigrep: . |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
182 | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
183 | - 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
|
184 | directory: inside-dir |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
185 | filenames: ../test-1.23.tar |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
186 | error: true |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
187 | grep: ERROR |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
188 | antigrep: Traceback |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
189 | prerun: | |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
190 | chmod 500 . |
481a2b4be471
[svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents:
16
diff
changeset
|
191 | |
19 | 192 | - 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
|
193 | options: -n -l |
19 | 194 | filenames: test-1.23.tar |
195 | output: | | |
196 | test-1.23/ | |
197 | test-1.23/1/ | |
198 | test-1.23/1/2/ | |
199 | test-1.23/1/2/3 | |
200 | test-1.23/a/ | |
201 | test-1.23/a/b | |
202 | test-1.23/foobar | |
203 | ||
204 | - 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
|
205 | options: -n --table |
19 | 206 | filenames: test-1.23_all.deb test-1.23.zip |
207 | output: | | |
208 | test-1.23_all.deb: | |
209 | 1/ | |
210 | 1/2/ | |
211 | 1/2/3 | |
212 | a/ | |
213 | a/b | |
214 | foobar | |
215 | ||
216 | test-1.23.zip: | |
217 | 1/2/3 | |
218 | a/b | |
219 | foobar | |
220 | ||
221 | - 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
|
222 | options: -n -t |
19 | 223 | filenames: test-text.gz |
224 | output: test-text | |
20
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
225 | |
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
|
226 | - 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
|
227 | options: -n |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
228 | 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
|
229 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
230 | mkdir test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
231 | cd test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
232 | tar -zxf ../$1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
233 | |
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
|
234 | - 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
|
235 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
236 | 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
|
237 | input: i |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
238 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
239 | mkdir test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
240 | cd test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
241 | tar -zxf ../$1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
242 | |
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
|
243 | - 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
|
244 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
245 | 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
|
246 | input: r |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
247 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
248 | tar -zxf $1 |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
249 | mv test test-onedir |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
250 | |
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
|
251 | - 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
|
252 | options: "" |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
253 | 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
|
254 | input: h |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
255 | baseline: | |
69c93c3e6972
[svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents:
19
diff
changeset
|
256 | 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
|
257 | |
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 | - 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
|
259 | 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
|
260 | 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
|
261 | 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
|
262 | 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
|
263 | 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
|
264 | 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
|
265 | |
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 | - 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
|
267 | 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
|
268 | 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
|
269 | 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
|
270 | 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
|
271 | 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
|
272 | 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
|
273 | 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
|
274 | |
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 | - 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
|
276 | 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
|
277 | 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
|
278 | 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
|
279 | 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
|
280 | 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
|
281 | 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
|
282 | |
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 | - 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
|
284 | 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
|
285 | 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
|
286 | 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
|
287 | 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
|
288 | tar -zxf $1 |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
289 | |
38
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
290 | - name: default behavior with one file |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
291 | options: -n |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
292 | filenames: test-onefile.tar.gz |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
293 | baseline: | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
294 | mkdir test-onefile |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
295 | cd test-onefile |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
296 | tar -zxf ../$1 |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
297 | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
298 | - name: one file extracted inside a directory |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
299 | options: "" |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
300 | filenames: test-onefile.tar.gz |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
301 | input: i |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
302 | baseline: | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
303 | mkdir test-onefile |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
304 | cd test-onefile |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
305 | tar -zxf ../$1 |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
306 | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
307 | - name: one file extracted with rename |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
308 | options: "" |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
309 | filenames: test-onefile.tar.gz |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
310 | input: r |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
311 | baseline: | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
312 | tar -zxOf $1 >test-onefile |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
313 | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
314 | - name: one file extracted here |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
315 | options: "" |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
316 | filenames: test-onefile.tar.gz |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
317 | input: h |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
318 | baseline: | |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
319 | tar -zxf $1 |
f637b9d24c21
[svn] Some more tests to make sure we always do the right thing in the
brett
parents:
35
diff
changeset
|
320 | |
22
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
321 | - 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
|
322 | 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
|
323 | options: "" |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
324 | antigrep: one entry |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
325 | baseline: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
326 | 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
|
327 | 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
|
328 | tar -zxf ../$1 |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
329 | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
330 | - 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
|
331 | 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
|
332 | options: "" |
28
4d88f2231d33
[svn] Change all the license notices from GPLv2 to GPLv3.
brett
parents:
23
diff
changeset
|
333 | 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
|
334 | input: h |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
335 | baseline: | |
b240777ae53e
[svn] Improve the way we check archive contents. If all the entries look like
brett
parents:
21
diff
changeset
|
336 | tar -zxf $1 |
23
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
337 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
338 | - 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
|
339 | 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
|
340 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
341 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
342 | h |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
343 | r |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
344 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
345 | tar -zxf $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
346 | mv test test-onedir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
347 | tar -zxf $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
348 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
349 | - name: interactive recursion (always) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
350 | 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
|
351 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
352 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
353 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
354 | a |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
355 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
356 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
357 | extract() { |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
358 | 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
|
359 | 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
|
360 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
361 | mkdir test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
362 | cd test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
363 | 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
|
364 | chmod 700 testdir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
365 | cd ../.. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
366 | } |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
367 | extract $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
368 | extract $1 .1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
369 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
370 | - name: interactive recursion (once) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
371 | 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
|
372 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
373 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
374 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
375 | o |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
376 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
377 | n |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
378 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
379 | mkdir test-recursive-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
380 | cd test-recursive-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
381 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
382 | mkdir test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
383 | cd test-badperms |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
384 | 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
|
385 | chmod 700 testdir |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
386 | cd ../.. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
387 | 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
|
388 | 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
|
389 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
390 | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
391 | - name: interactive recursion (never) |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
392 | 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
|
393 | options: "" |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
394 | input: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
395 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
396 | v |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
397 | i |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
398 | baseline: | |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
399 | extract() { |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
400 | 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
|
401 | 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
|
402 | tar -jxf ../$1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
403 | cd .. |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
404 | } |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
405 | extract $1 |
039dd321a7d0
[svn] If an archive contains other archives, and the user didn't specify that
brett
parents:
22
diff
changeset
|
406 | 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
|
407 | |
47 | 408 | - name: recursion in subdirectories here |
409 | filenames: test-deep-recursion.tar | |
410 | options: "" | |
411 | input: | | |
412 | h | |
413 | o | |
414 | grep: "contains 2" | |
415 | baseline: | | |
416 | tar -xf $1 | |
417 | cd subdir | |
418 | zcat test-text.gz > test-text | |
419 | cd subsubdir | |
420 | zcat test-text.gz > test-text | |
421 | ||
422 | - name: recursion in subdirectories with rename | |
423 | filenames: test-deep-recursion.tar | |
424 | options: "" | |
425 | input: | | |
426 | r | |
427 | o | |
428 | grep: "contains 2" | |
429 | baseline: | | |
430 | tar -xf $1 | |
431 | mv subdir test-deep-recursion | |
432 | cd test-deep-recursion | |
433 | zcat test-text.gz > test-text | |
434 | cd subsubdir | |
435 | zcat test-text.gz > test-text | |
436 | ||
437 | - name: recursion in subdirectories inside new dir | |
438 | filenames: test-deep-recursion.tar | |
439 | options: "" | |
440 | input: | | |
441 | i | |
442 | o | |
443 | grep: "contains 2" | |
444 | baseline: | | |
445 | mkdir test-deep-recursion | |
446 | cd test-deep-recursion | |
447 | tar -xf ../$1 | |
448 | cd subdir | |
449 | zcat test-text.gz > test-text | |
450 | cd subsubdir | |
451 | zcat test-text.gz > test-text | |
452 | ||
30
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
453 | - 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
|
454 | 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
|
455 | 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
|
456 | 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
|
457 | baseline: | |
1015bbd6dc5e
[svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents:
29
diff
changeset
|
458 | tar -zxf $1 |
33
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
459 | |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
460 | - name: extracting file with misleading extension |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
461 | filenames: trickery.tar.gz |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
462 | prerun: cp ${1}test-1.23.zip ${1}trickery.tar.gz |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
463 | cleanup: rm -f ${1}trickery.tar.gz |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
464 | baseline: | |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
465 | mkdir trickery |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
466 | cd trickery |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
467 | unzip -q ../$1 |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
468 | |
39
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
469 | - name: non-archive error |
33
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
470 | filenames: /dev/null |
3547e3124729
[svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents:
31
diff
changeset
|
471 | error: true |
45
37d555407334
[svn] At work I was getting an unhelpful "No such file or directory" error when I
brett
parents:
41
diff
changeset
|
472 | grep: "not a known archive type" |
39
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
473 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
474 | - name: no such file error |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
475 | filenames: nonexistent-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
476 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
477 | grep: "[Nn]o such file" |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
478 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
479 | - name: no such file error with no extension |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
480 | filenames: nonexistent-file |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
481 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
482 | grep: "[Nn]o such file" |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
483 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
484 | - name: try to extract a directory error |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
485 | filenames: test-directory |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
486 | prerun: mkdir test-directory |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
487 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
488 | grep: "cannot extract a directory" |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
489 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
490 | - name: permission denied error |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
491 | filenames: unreadable-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
492 | prerun: | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
493 | touch unreadable-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
494 | chmod 000 unreadable-file.tar.gz |
47 | 495 | cleanup: rm -f unreadable-file.tar.gz |
39
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
496 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
497 | grep: "[Pp]ermission denied" |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
498 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
499 | - name: permission denied no-pipe file error |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
500 | filenames: unreadable-file.zip |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
501 | prerun: | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
502 | touch unreadable-file.zip |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
503 | chmod 000 unreadable-file.zip |
47 | 504 | cleanup: rm -f unreadable-file.zip |
39
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
505 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
506 | grep: "[Pp]ermission denied" |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
507 | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
508 | - name: bad file error |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
509 | filenames: bogus-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
510 | prerun: | |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
511 | touch bogus-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
512 | cleanup: rm -f bogus-file.tar.gz |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
513 | error: true |
027fcd7ae002
[svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents:
38
diff
changeset
|
514 | grep: "returned status code [^0]" |
40
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
515 | |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
516 | - name: try to extract in unwritable directory |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
517 | directory: unwritable-dir |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
518 | filenames: ../test-1.23.tar.gz |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
519 | prerun: chmod 500 . |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
520 | error: true |
ee6a869f8da1
[svn] Be a little nicer about explaining that we can't extract to the current
brett
parents:
39
diff
changeset
|
521 | grep: "cannot extract here: [Pp]ermission denied" |
41
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
522 | |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
523 | - name: recursive listing is a no-op |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
524 | options: -rl |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
525 | filenames: test-recursive-badperms.tar.bz2 |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
526 | grep: test-badperms.tar |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
527 | antigrep: testdir/ |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
528 | |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
529 | - name: graceful coping when many extraction directories are taken |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
530 | directory: busydir |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
531 | prerun: | |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
532 | mkdir test-1.23 |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
533 | for i in $(seq 1 10); do mkdir test-1.23.$i; done |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
534 | filenames: ../test-1.23.tar.gz |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
535 | grep: "WARNING: extracting" |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
536 | |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
537 | - name: graceful coping when many decompression targets are taken |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
538 | directory: busydir |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
539 | prerun: | |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
540 | touch test-text |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
541 | for i in $(seq 1 10); do touch test-text.$i; done |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
542 | filenames: ../test-text.gz |
e3675644bbb6
[svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents:
40
diff
changeset
|
543 | grep: "WARNING: extracting" |