tests/tests.yml

Fri, 19 Oct 2007 23:06:53 -0400

author
brett
date
Fri, 19 Oct 2007 23:06:53 -0400
branch
trunk
changeset 30
1015bbd6dc5e
parent 29
5fad99c17221
child 31
c3a2760d1c3a
permissions
-rw-r--r--

[svn] If we can't figure out what the file is by mimetype, try using the file
command to figure out what it is instead.

This completely changes the program structure because now we might try to
use several extractors on a particular file before giving up. I haven't
really done the refactoring that would be appropriate for a change this
fundamental. I'd like to do that before the next release.

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

mercurial