Lines Matching +full:test_patterns_4 +full:. +full:tar

4  * All rights reserved.
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
13 * documentation and/or other materials provided with the distribution.
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 #include "test.h"
33 const char *reffile2 = "test_patterns_2.tar"; in DEFINE_TEST()
34 const char *reffile3 = "test_patterns_3.tar"; in DEFINE_TEST()
35 const char *reffile4 = "test_patterns_4.tar"; in DEFINE_TEST()
44 * Test basic command-line pattern handling. in DEFINE_TEST()
49 * didn't produce an error. in DEFINE_TEST()
56 r = systemf("%s cfv tar1.tgz foo > tar1a.out 2> tar1a.err", testprog); in DEFINE_TEST()
58 r = systemf("%s xv --no-same-owner -f tar1.tgz foo bar > tar1b.out 2> tar1b.err", testprog); in DEFINE_TEST()
59 …failure("tar should return non-zero because a file was given on the command line that's not in the… in DEFINE_TEST()
67 r = systemf("%s tf %s /tmp/foo/bar > tar2a.out 2> tar2a.err", in DEFINE_TEST()
70 assertFileContainsLinesAnyOrder("tar2a.out", tar2aExpected); in DEFINE_TEST()
71 assertEmptyFile("tar2a.err"); in DEFINE_TEST()
74 * Test 3 archive has some entries starting with '/' and some not. in DEFINE_TEST()
79 r = systemf("%s x --no-same-owner -f %s tmp/foo/bar > tar3a.out 2> tar3a.err", in DEFINE_TEST()
82 assertEmptyFile("tar3a.out"); in DEFINE_TEST()
85 assertNonEmptyFile("tar3a.err"); in DEFINE_TEST()
87 r = systemf("%s x --no-same-owner -f %s /tmp/foo/baz > tar3b.out 2> tar3b.err", in DEFINE_TEST()
90 assertEmptyFile("tar3b.out"); in DEFINE_TEST()
91 assertNonEmptyFile("tar3b.err"); in DEFINE_TEST()
93 /* Test 3c: ./tmp/foo/bar should not match /tmp/foo/bar */ in DEFINE_TEST()
94 r = systemf("%s x --no-same-owner -f %s ./tmp/foo/bar > tar3c.out 2> tar3c.err", in DEFINE_TEST()
97 assertEmptyFile("tar3c.out"); in DEFINE_TEST()
98 assertNonEmptyFile("tar3c.err"); in DEFINE_TEST()
100 /* Test 3d: ./tmp/foo/baz should match tmp/foo/baz */ in DEFINE_TEST()
101 r = systemf("%s x --no-same-owner -f %s ./tmp/foo/baz > tar3d.out 2> tar3d.err", in DEFINE_TEST()
104 assertEmptyFile("tar3d.out"); in DEFINE_TEST()
105 assertEmptyFile("tar3d.err"); in DEFINE_TEST()
110 * such as 'c:\', '//./c:/' or '//?/c:/'. in DEFINE_TEST()
114 r = systemf("%s x --no-same-owner -f %s -C tmp > tar4.out 2> tar4.err", in DEFINE_TEST()
117 assertEmptyFile("tar4.out"); in DEFINE_TEST()
118 assertNonEmptyFile("tar4.err"); in DEFINE_TEST()
124 char file_c[] = "tmp/../fileXX"; in DEFINE_TEST()
125 char file_d[] = "tmp/../../fileXX"; in DEFINE_TEST()
132 * Including server and share names. in DEFINE_TEST()
141 * Including server and share names. in DEFINE_TEST()
160 * Not extracted patterns. in DEFINE_TEST()
161 * D:../file05 in DEFINE_TEST()
162 * c:../../file06 in DEFINE_TEST()
163 * //?/UNC/../file17 in DEFINE_TEST()
164 * //?/unc/../file20 in DEFINE_TEST()
165 * z:..\file25 in DEFINE_TEST()
166 * c:..\..\file26 in DEFINE_TEST()
167 * \\?\UNC\..\file37 in DEFINE_TEST()
168 * \\?\unc\..\file40 in DEFINE_TEST()
169 * c:../..\file43 in DEFINE_TEST()
170 * \/?\UnC\../file54 in DEFINE_TEST()
185 /* Extracted patterns. */ in DEFINE_TEST()