source: release-kits/lirk3/resources/gs3-release-maker/apache-ant-1.6.5/src/etc/testcases/taskdefs/unzip.xml@ 14982

Last change on this file since 14982 was 14982, checked in by oranfry, 16 years ago

initial import of LiRK3

File size: 2.5 KB
Line 
1<?xml version="1.0"?>
2
3<project name="xxx-test" basedir="." default="test1">
4
5 <target name="cleanup">
6 <delete file="asf-logo.gif" />
7 <delete file="unziptest.zip"/>
8 <delete dir="unziptestin"/>
9 <delete dir="unziptestout"/>
10 </target>
11
12 <target name="test1">
13 <unzip/>
14 </target>
15
16 <target name="test2">
17 <unzip src=""/>
18 </target>
19
20 <target name="test3">
21 <unzip dest=""/>
22 </target>
23
24 <target name="testZipTask">
25 <ant antfile="zip.xml" target="feather" />
26 <unzip src="asf-logo.gif.zip" dest="." />
27 <ant antfile="zip.xml" target="cleanup" />
28 </target>
29
30 <target name="testUncompressedZipTask">
31 <ant antfile="zip.xml" target="uncompressed-feather" />
32 <unzip src="asf-logo.gif.zip" dest="." />
33 <ant antfile="zip.xml" target="cleanup" />
34 </target>
35
36 <target name="realTest">
37 <unzip src="expected/asf-logo.gif.zip" dest="." />
38 </target>
39
40 <target name="prepareTestZip">
41 <mkdir dir="unziptestin/1"/>
42 <mkdir dir="unziptestin/2"/>
43 <touch file="unziptestin/1/foo"/>
44 <touch file="unziptestin/2/bar"/>
45 <zip destfile="unziptest.zip" basedir="unziptestin"/>
46 </target>
47
48 <target name="testPatternSetExcludeOnly" depends="prepareTestZip">
49 <unzip dest="unziptestout" src="unziptest.zip">
50 <patternset>
51 <exclude name="1/**"/>
52 </patternset>
53 </unzip>
54 </target>
55
56 <target name="testPatternSetIncludeOnly" depends="prepareTestZip">
57 <unzip dest="unziptestout" src="unziptest.zip">
58 <patternset>
59 <include name="2/**"/>
60 </patternset>
61 </unzip>
62 </target>
63
64 <target name="testPatternSetIncludeAndExclude" depends="prepareTestZip">
65 <unzip dest="unziptestout" src="unziptest.zip">
66 <patternset>
67 <include name="2/**"/>
68 <exclude name="2/**"/>
69 </patternset>
70 </unzip>
71 </target>
72
73 <target name="selfExtractingArchive">
74 <mkdir dir="unziptestout"/>
75 <unzip dest="unziptestout" src="zip/test.exe"/>
76 </target>
77
78 <!-- Bugzilla Report 20969 -->
79 <target name="testPatternSetSlashOnly" depends="prepareTestZip">
80 <unzip dest="unziptestout" src="unziptest.zip">
81 <patternset>
82 <include name="2/"/>
83 </patternset>
84 </unzip>
85 </target>
86
87 <!-- Bugzilla Report 10504 -->
88 <target name="encodingTest">
89 <mkdir dir="unziptestin"/>
90 <touch file="unziptestin/foo"/>
91 <zip zipfile="unziptest.zip" basedir="unziptestin" encoding="UnicodeBig"/>
92 <mkdir dir="unziptestout"/>
93 <unzip src="unziptest.zip" dest="unziptestout" encoding="UnicodeBig"/>
94 </target>
95
96</project>
Note: See TracBrowser for help on using the repository browser.