Browse Source

tests for PR 43946

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@793794 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 16 years ago
parent
commit
a9aa3e7efe
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      src/tests/antunit/taskdefs/jar-test.xml

+ 26
- 0
src/tests/antunit/taskdefs/jar-test.xml View File

@@ -120,4 +120,30 @@
<au:assertResourceContains value="Second: Main Section"
resource="${output}/META-INF/MANIFEST.MF"/>
</target>

<target name="testWhenManifestOnly"
description="https://issues.apache.org/bugzilla/show_bug.cgi?id=43946">
<mkdir dir="${input}"/>
<mkdir dir="${output}"/>
<jar destfile="${output}/first.jar">
<fileset dir="${input}"/>
</jar>
<au:assertFileExists file="${output}/first.jar"/>
<au:assertLogDoesntContain text="skipping jar archive"/>
<jar destfile="${output}/second.jar" whenmanifestonly="create">
<fileset dir="${input}"/>
</jar>
<au:assertFileExists file="${output}/second.jar"/>
<au:assertLogDoesntContain text="skipping jar archive"/>
<jar destfile="${output}/third.jar" whenmanifestonly="skip">
<fileset dir="${input}"/>
</jar>
<au:assertFileDoesntExist file="${output}/third.jar"/>
<au:assertLogContains text="skipping jar archive"/>
<au:expectfailure>
<jar destfile="${output}/forth.jar" whenmanifestonly="fail">
<fileset dir="${input}"/>
</jar>
</au:expectfailure>
</target>
</project>

Loading…
Cancel
Save