tests/tests.yml

Sun, 30 Aug 2009 11:46:30 -0400

author
Brett Smith <brettcsmith@brettcsmith.org>
date
Sun, 30 Aug 2009 11:46:30 -0400
branch
trunk
changeset 123
8570c14304bb
parent 122
2b676283366a
permissions
-rw-r--r--

add support for xz compression

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
108
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
32 - name: .deb with LZMA compression
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
33 filenames: test-2_all.deb
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
34 baseline: |
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
35 mkdir test-2
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
36 cd test-2
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
37 ar p ../$1 data.tar.lzma | lzcat | tar -x
b8316c2b36df Add support for new .deb archives with data.tar.{bz2,lzma}.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 106
diff changeset
38
29
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
39 - name: basic .gem
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
40 filenames: test-1.23.gem
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
41 baseline: |
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
42 mkdir test-1.23
29
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
43 cd test-1.23
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
44 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
45
31
c3a2760d1c3a [svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents: 30
diff changeset
46 - name: basic .7z
c3a2760d1c3a [svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents: 30
diff changeset
47 filenames: test-1.23.7z
c3a2760d1c3a [svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents: 30
diff changeset
48 baseline: |
c3a2760d1c3a [svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents: 30
diff changeset
49 7z x $1
c3a2760d1c3a [svn] Refactor actions (extract the archive, vs. list the contents) into their
brett
parents: 30
diff changeset
50
34
a8f875e02c83 [svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents: 33
diff changeset
51 - name: basic .lzma
a8f875e02c83 [svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents: 33
diff changeset
52 filenames: test-1.23.tar.lzma
a8f875e02c83 [svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents: 33
diff changeset
53 baseline: |
a8f875e02c83 [svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents: 33
diff changeset
54 lzcat $1 | tar -x
a8f875e02c83 [svn] Add support for LZMA compression. Holy crap that was easy.
brett
parents: 33
diff changeset
55
76
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
56 - name: basic .cpio
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
57 filenames: test-1.23.cpio
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
58 baseline: |
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
59 cpio -i --make-directories <$1
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
60 antigrep: blocks?
705642fcb92c Give extraction stderr more context, and suppress normal cpio stderr junk.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 71
diff changeset
61
29
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
62 - name: .deb metadata
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
63 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
64 options: --metadata
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
65 baseline: |
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
66 mkdir test-1.23
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
67 cd test-1.23
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
68 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
69
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
70 - name: .gem metadata
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
71 filenames: test-1.23.gem
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
72 options: -m
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
73 baseline: |
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
74 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
75 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
76 posttest: |
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
77 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
78
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
79 - name: recursion and permissions
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
80 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
81 options: -n -r
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
82 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
83 mkdir test-recursive-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
84 cd test-recursive-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
85 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
86 mkdir test-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
87 cd test-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
88 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
89 chmod 700 testdir
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
90 posttest: |
29
5fad99c17221 [svn] Add support for Ruby Gems, and extracting metadata from .deb/.gem files.
brett
parents: 28
diff changeset
91 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
92 "xhey" ]; then exit 1; fi
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
93
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
94 - name: decompressing gz
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
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
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
97 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
98 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
99 posttest: |
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
100 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
101
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
102 - 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
103 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
104 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
105 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
106 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
107 posttest: |
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
108 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
109
123
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
110 - name: decompressing xz
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
111 directory: inside-dir
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
112 filenames: ../test-text.xz
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
113 baseline: |
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
114 xzcat $1 >test-text
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
115 posttest: |
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
116 if [ "x`cat test-text`" != "xhi" ]; then exit 1; fi
8570c14304bb add support for xz compression
Brett Smith <brettcsmith@brettcsmith.org>
parents: 122
diff changeset
117
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
118 - name: decompression with -r
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
119 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
120 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
121 options: -n -r
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
122 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
123 zcat $1 >test-text
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
124
16
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
125 - name: decompression with -fr
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
126 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
127 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
128 options: -n -fr
16
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
129 baseline: |
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
130 zcat $1 >test-text
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
131
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
132 - name: overwrite protection
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
133 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
134 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
135 mkdir test-1.23.1
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
136 cd test-1.23.1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
137 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
138 prerun: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
139 mkdir test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
140
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
141 - name: overwrite option
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
142 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
143 options: -n -o
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
144 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
145 cd test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
146 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
147 prerun: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
148 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
149
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
150 - name: flat option
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
151 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
152 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
153 options: -n -f
15
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
154 baseline: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
155 tar -jxf $1
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
156
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
157 - 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
158 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
159 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
160 options: -n -fr
15
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
161 baseline: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
162 tar -jxf $1
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
163 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
164 chmod 700 testdir
15
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
165 posttest: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
166 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
167
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
168 - name: no files
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
169 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
170 grep: "[Uu]sage"
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
171
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
172 - name: bad file
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 filenames: nonexistent-file.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
175
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
176 - name: not an archive
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
177 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
178 filenames: tests.yml
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
179
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
180 - name: bad options
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
181 options: -n --nonexistent-option
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
182 filenames: test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
183 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
184
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
185 - name: --version
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
186 options: -n --version
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
187 grep: ersion \d+\.\d+
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
188 filenames: test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
189 baseline: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
190 exit 0
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
191
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
192 - 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
193 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
194 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
195 baseline: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
196 tar -xf $2
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
197
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
198 - name: silence
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
199 filenames: tests.yml
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
200 options: -n -qq
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
201 error: true
122
2b676283366a use the PyYAML library for tests, instead of Syck
Brett Smith <brettcsmith@brettcsmith.org>
parents: 108
diff changeset
202 antigrep: '.'
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
203
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
204 - 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
205 directory: inside-dir
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
206 filenames: ../test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
207 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
208 grep: ERROR
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
209 antigrep: Traceback
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
210 prerun: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
211 chmod 500 .
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
212
19
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
213 - 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
214 options: -n -l
19
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
215 filenames: test-1.23.tar
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
216 output: |
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
217 test-1.23/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
218 test-1.23/1/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
219 test-1.23/1/2/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
220 test-1.23/1/2/3
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
221 test-1.23/a/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
222 test-1.23/a/b
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
223 test-1.23/foobar
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
224
83
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
225 - name: list contents of .cpio
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
226 options: -n -l
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
227 filenames: test-1.23.cpio
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
228 grep: ^test-1\.23/1/2/3$
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
229 antigrep: blocks?
cb56c72f3d42 Use the --quiet option for cpio -t too.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 79
diff changeset
230
19
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
231 - 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
232 options: -n --table
19
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
233 filenames: test-1.23_all.deb test-1.23.zip
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
234 output: |
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
235 test-1.23_all.deb:
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
236 1/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
237 1/2/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
238 1/2/3
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
239 a/
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
240 a/b
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
241 foobar
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
242
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
243 test-1.23.zip:
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
244 1/2/3
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
245 a/b
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
246 foobar
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
247
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
248 - 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
249 options: -n -t
19
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
250 filenames: test-text.gz
bb6e9f4af1a5 [svn] Rename the program to dtrx.
brett
parents: 17
diff changeset
251 output: test-text
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
252
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
253 - 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
254 options: -n
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
255 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
256 baseline: |
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
257 mkdir test-onedir
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
258 cd test-onedir
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
259 tar -zxf ../$1
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
260
84
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
261 - name: one directory extracted inside another interactively (gz)
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
262 options: ""
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
263 filenames: test-onedir.tar.gz
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
264 grep: one directory
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
265 input: i
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
266 baseline: |
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
267 mkdir test-onedir
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
268 cd test-onedir
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
269 tar -zxf ../$1
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
270
84
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
271 - name: one directory extracted with rename interactively (gz)
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
272 options: ""
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
273 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
274 input: r
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
275 baseline: |
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
276 tar -zxf $1
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
277 mv test test-onedir
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
278
84
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
279 - name: one directory extracted here interactively (gz)
20
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
280 options: ""
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
281 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
282 input: h
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
283 baseline: |
69c93c3e6972 [svn] If the archive contains one directory with the "wrong" name, ask the user
brett
parents: 19
diff changeset
284 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
285
84
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
286 - name: --one=inside
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
287 options: "--one=inside -n"
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
288 filenames: test-onedir.tar.gz
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
289 baseline: |
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
290 mkdir test-onedir
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
291 cd test-onedir
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
292 tar -zxf ../$1
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
293
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
294 - name: --one=rename
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
295 options: "--one-entry=rename -n"
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
296 filenames: test-onedir.tar.gz
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
297 baseline: |
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
298 tar -zxf $1
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
299 mv test test-onedir
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
300
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
301 - name: --one=here
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
302 options: "--one=here -n"
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
303 filenames: test-onedir.tar.gz
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
304 baseline: |
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
305 tar -zxf $1
d78d63cb4c4e Add --one-entry option to specify default handling for one-entry archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 83
diff changeset
306
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
307 - 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
308 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
309 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
310 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
311 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
312 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
313 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
314
fd3e10410040 [svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents: 20
diff changeset
315 - 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
316 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
317 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
318 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
319 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
320 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
321 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
322 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
323
fd3e10410040 [svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents: 20
diff changeset
324 - 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
325 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
326 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
327 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
328 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
329 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
330 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
331
fd3e10410040 [svn] Do some tests with a .tar.bz2 as well as a .tar.gz. I thought there were
brett
parents: 20
diff changeset
332 - 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
333 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
334 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
335 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
336 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
337 tar -zxf $1
22
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
338
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
339 - 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
340 options: -n
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
341 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
342 baseline: |
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
343 mkdir test-onefile
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
344 cd test-onefile
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
345 tar -zxf ../$1
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
346
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
347 - 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
348 options: ""
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
349 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
350 input: i
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
351 grep: one file
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
352 baseline: |
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
353 mkdir test-onefile
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
354 cd test-onefile
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
355 tar -zxf ../$1
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
356
103
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
357 - name: prompt wording with one file
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
358 options: ""
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
359 filenames: test-onefile.tar.gz
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
360 input: i
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
361 grep: file _I_nside
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
362
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
363 - name: one file extracted with rename, with Expected text
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
364 options: ""
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
365 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
366 input: r
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
367 grep: "Expected: test-onefile"
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
368 baseline: |
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
369 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
370
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
371 - name: one file extracted here, with Actual text
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
372 options: ""
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
373 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
374 input: h
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
375 grep: " Actual: test-text"
38
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
376 baseline: |
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
377 tar -zxf $1
f637b9d24c21 [svn] Some more tests to make sure we always do the right thing in the
brett
parents: 35
diff changeset
378
22
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
379 - 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
380 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
381 options: ""
103
f68a0ca870b0 Reword one entry prompt; wrap prompt choices; better term size detection.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 100
diff changeset
382 antigrep: one
22
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
383 baseline: |
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
384 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
385 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
386 tar -zxf ../$1
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
387
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
388 - 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
389 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
390 options: ""
65
0aea49161478 Make the wording on the One Entry question a little clearer.
Brett Smith <brett@brettcsmith.org>
parents: 62
diff changeset
391 grep: "Actual: (./)?dir/"
22
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
392 input: h
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
393 baseline: |
b240777ae53e [svn] Improve the way we check archive contents. If all the entries look like
brett
parents: 21
diff changeset
394 tar -zxf $1
23
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
395
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
396 - 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
397 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
398 options: ""
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
399 input: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
400 h
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
401 r
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
402 baseline: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
403 tar -zxf $1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
404 mv test test-onedir
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
405 tar -zxf $1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
406
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
407 - name: interactive recursion (always)
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
408 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
409 options: ""
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
410 input: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
411 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
412 a
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
413 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
414 baseline: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
415 extract() {
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
416 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
417 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
418 tar -jxf ../$1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
419 mkdir test-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
420 cd test-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
421 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
422 chmod 700 testdir
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
423 cd ../..
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
424 }
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
425 extract $1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
426 extract $1 .1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
427
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
428 - name: interactive recursion (once)
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
429 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
430 options: ""
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
431 input: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
432 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
433 o
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
434 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
435 n
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
436 baseline: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
437 mkdir test-recursive-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
438 cd test-recursive-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
439 tar -jxf ../$1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
440 mkdir test-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
441 cd test-badperms
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
442 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
443 chmod 700 testdir
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
444 cd ../..
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
445 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
446 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
447 tar -jxf ../$1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
448
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
449 - name: interactive recursion (never)
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
450 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
451 options: ""
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
452 input: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
453 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
454 v
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
455 i
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
456 baseline: |
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
457 extract() {
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
458 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
459 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
460 tar -jxf ../$1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
461 cd ..
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
462 }
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
463 extract $1
039dd321a7d0 [svn] If an archive contains other archives, and the user didn't specify that
brett
parents: 22
diff changeset
464 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
465
47
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
466 - name: recursion in subdirectories here
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
467 filenames: test-deep-recursion.tar
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
468 options: ""
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
469 input: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
470 h
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
471 o
122
2b676283366a use the PyYAML library for tests, instead of Syck
Brett Smith <brettcsmith@brettcsmith.org>
parents: 108
diff changeset
472 grep: 'contains 2 other archive file\(s\), out of 2 file\(s\)'
47
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
473 baseline: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
474 tar -xf $1
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
475 cd subdir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
476 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
477 cd subsubdir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
478 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
479
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
480 - name: recursion in subdirectories with rename
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
481 filenames: test-deep-recursion.tar
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
482 options: ""
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
483 input: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
484 r
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
485 o
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
486 grep: "contains 2"
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
487 baseline: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
488 tar -xf $1
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
489 mv subdir test-deep-recursion
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
490 cd test-deep-recursion
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
491 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
492 cd subsubdir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
493 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
494
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
495 - name: recursion in subdirectories inside new dir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
496 filenames: test-deep-recursion.tar
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
497 options: ""
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
498 input: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
499 i
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
500 o
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
501 grep: "contains 2"
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
502 baseline: |
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
503 mkdir test-deep-recursion
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
504 cd test-deep-recursion
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
505 tar -xf ../$1
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
506 cd subdir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
507 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
508 cd subsubdir
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
509 zcat test-text.gz > test-text
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
510
30
1015bbd6dc5e [svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents: 29
diff changeset
511 - 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
512 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
513 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
514 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
515 baseline: |
1015bbd6dc5e [svn] If we can't figure out what the file is by mimetype, try using the file
brett
parents: 29
diff changeset
516 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
517
3547e3124729 [svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents: 31
diff changeset
518 - 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
519 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
520 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
521 cleanup: rm -f ${1}trickery.tar.gz
122
2b676283366a use the PyYAML library for tests, instead of Syck
Brett Smith <brettcsmith@brettcsmith.org>
parents: 108
diff changeset
522 antigrep: '.'
33
3547e3124729 [svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents: 31
diff changeset
523 baseline: |
3547e3124729 [svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents: 31
diff changeset
524 mkdir trickery
3547e3124729 [svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents: 31
diff changeset
525 cd trickery
3547e3124729 [svn] Fix some bugs and make things a little more user-friendly now that we can
brett
parents: 31
diff changeset
526 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
527
79
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
528 - name: listing file with misleading extension
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
529 options: -l
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
530 filenames: trickery.tar.gz
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
531 prerun: cp ${1}test-1.23.zip ${1}trickery.tar.gz
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
532 cleanup: rm -f ${1}trickery.tar.gz
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
533 grep: "^1/2/3$"
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
534 antigrep: "^dtrx:"
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
535
106
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
536 - name: listing multiple file with misleading extensions
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
537 options: -l
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
538 filenames: trickery.tar.gz trickery.tar.gz
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
539 prerun: cp ${1}test-1.23.zip ${1}trickery.tar.gz
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
540 cleanup: rm -f ${1}trickery.tar.gz
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
541 output: |
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
542 trickery.tar.gz:
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
543 1/2/3
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
544 a/b
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
545 foobar
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
546
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
547 trickery.tar.gz:
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
548 1/2/3
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
549 a/b
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
550 foobar
dcf005ef7070 Start printing results ASAP with -l or -t.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 103
diff changeset
551
39
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
552 - 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
553 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
554 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
555 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
556
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
557 - 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
558 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
559 error: true
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
560 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
561
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
562 - 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
563 filenames: nonexistent-file
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
564 error: true
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
565 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
566
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
567 - 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
568 filenames: test-directory
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
569 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
570 error: true
79
9c0cc7aef510 Improve dtrx -l performance on misnamed files, and clean other error messages.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 78
diff changeset
571 grep: "cannot work with a directory"
39
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
572
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
573 - 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
574 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
575 prerun: |
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
576 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
577 chmod 000 unreadable-file.tar.gz
47
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
578 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
579 error: true
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
580 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
581
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
582 - 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
583 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
584 prerun: |
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
585 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
586 chmod 000 unreadable-file.zip
47
b034b6b4227d [svn] Fix various bugs in the recursive extraction.
brett
parents: 45
diff changeset
587 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
588 error: true
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
589 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
590
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
591 - 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
592 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
593 prerun: |
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
594 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
595 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
596 error: true
027fcd7ae002 [svn] Improve the error reporting to be more user-friendly, at least in many of
brett
parents: 38
diff changeset
597 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
598
ee6a869f8da1 [svn] Be a little nicer about explaining that we can't extract to the current
brett
parents: 39
diff changeset
599 - 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
600 directory: unwritable-dir
ee6a869f8da1 [svn] Be a little nicer about explaining that we can't extract to the current
brett
parents: 39
diff changeset
601 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
602 prerun: chmod 500 .
ee6a869f8da1 [svn] Be a little nicer about explaining that we can't extract to the current
brett
parents: 39
diff changeset
603 error: true
ee6a869f8da1 [svn] Be a little nicer about explaining that we can't extract to the current
brett
parents: 39
diff changeset
604 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
605
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
606 - 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
607 options: -rl
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
608 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
609 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
610 antigrep: testdir/
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
611
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
612 - 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
613 directory: busydir
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
614 prerun: |
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
615 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
616 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
617 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
618 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
619
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
620 - 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
621 directory: busydir
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
622 prerun: |
e3675644bbb6 [svn] Minor clean-ups. The most important of these is that we now have a better
brett
parents: 40
diff changeset
623 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
624 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
625 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
626 grep: "WARNING: extracting"
52
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
627
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
628 - name: output filenames with -v
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
629 options: -v -n
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
630 filenames: test-onedir.tar.gz test-text.gz
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
631 output: |
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
632 test-onedir.tar.gz:
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
633 test-onedir/
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
634 test-onedir/test/
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
635 test-onedir/test/foobar
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
636 test-onedir/test/quux
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
637
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
638 test-text.gz:
cf191f957fd0 [svn] Make just one -v print a list of filenames, a la tar.
brett
parents: 47
diff changeset
639 test-text
53
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
640
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
641 - name: output filenames with -v and -f
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
642 options: -nvf
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
643 directory: busydir
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
644 filenames: ../test-onedir.tar.gz
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
645 output: |
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
646 test/
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
647 test/foobar
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
648 test/quux
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
649
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
650 - name: list recursive archives
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
651 options: ""
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
652 filenames: test-deep-recursion.tar
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
653 input: |
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
654 r
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
655 l
cd853ddb224c [svn] Add interactive option to list recursive archives when found.
brett
parents: 52
diff changeset
656 n
122
2b676283366a use the PyYAML library for tests, instead of Syck
Brett Smith <brettcsmith@brettcsmith.org>
parents: 108
diff changeset
657 grep: '^test-deep-recursion/subsubdir/test-text\.gz$'
62
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
658
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
659 - name: partly failed extraction
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
660 options: -n
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
661 filenames: test-tar-with-node.tar.gz
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
662 baseline: |
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
663 mkdir test-tar-with-node
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
664 cd test-tar-with-node
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
665 tar -zxf ../$1
17d845dacff5 Deal with partially extracted tarballs.
Brett Smith <brett@brettcsmith.org>
parents: 53
diff changeset
666 grep: Cannot mknod
66
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
667
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
668 - name: flat extraction of one-file archive
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
669 directory: inside-dir
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
670 options: -f
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
671 filenames: ../test-onefile.tar.gz
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
672 baseline: tar -zxf $1
af0b822b012e Don't prompt for one entry handling with -f.
Brett Smith <brett@brettcsmith.org>
parents: 65
diff changeset
673 antigrep: "contains"
71
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
674
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
675 - name: test recursive extraction of one archive
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
676 directory: inside-dir
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
677 options: ""
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
678 filenames: ../test-one-archive.tar.gz
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
679 baseline: |
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
680 tar -zxf $1
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
681 zcat test-text.gz >test-text
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
682 input: |
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
683 h
b0290eeb3b7a Recurse better when the contents were just one file.
Brett Smith <brett@brettcsmith.org>
parents: 70
diff changeset
684 o
100
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
685
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
686 - name: extracting empty archive
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
687 filenames: test-empty.tar.bz2
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
688 baseline: ""
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
689
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
690 - name: listing empty archive
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
691 filenames: test-empty.tar.bz2
7353b443dc98 Fix crasher bug when extracting empty archives.
Brett Smith <brettcsmith@brettcsmith.org>
parents: 84
diff changeset
692 options: -l
122
2b676283366a use the PyYAML library for tests, instead of Syck
Brett Smith <brettcsmith@brettcsmith.org>
parents: 108
diff changeset
693 antigrep: '.'

mercurial