tests/tests.yml

Sun, 31 Dec 2006 19:29:46 -0500

author
brett
date
Sun, 31 Dec 2006 19:29:46 -0500
branch
trunk
changeset 17
481a2b4be471
parent 16
29794d4d41aa
child 19
bb6e9f4af1a5
permissions
-rw-r--r--

[svn] Lots of tests for various boundary cases, and slightly better handling for
some of them.

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: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
28 TD=$PWD
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
29 mkdir test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
30 cd /tmp
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
31 ar x $TD/$1 data.tar.gz
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
32 cd $TD/test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
33 tar -zxf /tmp/data.tar.gz
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
34 rm /tmp/data.tar.gz
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
35
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
36 - name: recursion and permissions
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
37 filenames: test-recursive-badperms.tar.bz2
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
38 options: -r
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
39 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
40 mkdir test-recursive-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
41 cd test-recursive-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
42 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
43 mkdir test-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
44 cd test-badperms
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
45 tar -xf ../test-badperms.tar
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
46 chmod 755 testdir
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
47 posttest: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
48 if [ "x`cat test-recursive-badperms/test-badperms/testdir/testfile`" = \
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
49 "xhey" ]; then exit 0; else exit 1; fi
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
50
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
51 - name: decompression
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
52 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
53 filenames: ../test-text.gz
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
54 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
55 zcat $1 >test-text
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
56
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
57 - name: decompression with -r
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
58 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
59 filenames: ../test-text.gz
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
60 options: -r
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
61 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
62 zcat $1 >test-text
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
63
16
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
64 - name: decompression with -fr
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
65 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
66 filenames: ../test-text.gz
16
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
67 options: -fr
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
68 baseline: |
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
69 zcat $1 >test-text
29794d4d41aa [svn] There's now an entirely new object hierarchy for handlers, because the
brett
parents: 15
diff changeset
70
14
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
71 - name: overwrite protection
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
72 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
73 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
74 mkdir test-1.23 test-1.23.1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
75 cd test-1.23.1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
76 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
77 prerun: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
78 mkdir test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
79
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
80 - name: overwrite option
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
81 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
82 options: -o
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
83 baseline: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
84 mkdir test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
85 cd test-1.23
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
86 tar -jxf ../$1
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
87 prerun: |
6f9e1bb59719 [svn] Add support for just decompressing files that are compressed. So, if you
brett
parents:
diff changeset
88 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
89
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
90 - name: flat option
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
91 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
92 filenames: ../test-1.23.tar.bz2
15
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
93 options: -f
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
94 baseline: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
95 tar -jxf $1
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
96
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
97 - 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
98 directory: inside-dir
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
99 filenames: ../test-recursive-badperms.tar.bz2
15
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
100 options: -fr
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
101 baseline: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
102 tar -jxf $1
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
103 tar -xf test-badperms.tar
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
104 chmod 755 testdir
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
105 posttest: |
28dbd52a8bb8 [svn] Add a -f/--flat option, which will extract the archive contents into the
brett
parents: 14
diff changeset
106 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
107
17
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
108 - name: no files
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
109 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
110 grep: "[Uu]sage"
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
111
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
112 - name: bad file
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
113 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
114 filenames: nonexistent-file.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
115
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
116 - name: not an archive
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
117 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
118 filenames: tests.yml
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
119
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
120 - name: bad options
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
121 options: --nonexistent-option
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
122 filenames: test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
123 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
124
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
125 - name: --version
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
126 options: --version
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
127 grep: ersion \d+\.\d+
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
128 filenames: test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
129 baseline: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
130 exit 0
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
131
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
132 - 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
133 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
134 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
135 baseline: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
136 tar -xf $2
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
137
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
138 - name: silence
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
139 filenames: tests.yml
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
140 options: -qq
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
141 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
142 antigrep: .
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
143
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
144 - 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
145 directory: inside-dir
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
146 filenames: ../test-1.23.tar
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
147 error: true
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
148 grep: ERROR
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
149 antigrep: Traceback
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
150 prerun: |
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
151 chmod 500 .
481a2b4be471 [svn] Lots of tests for various boundary cases, and slightly better handling for
brett
parents: 16
diff changeset
152

mercurial