Skip to content

Commit c16a1f2

Browse files
committed
Make sure that it fails with "not found" when version is incorrect
1 parent 3a8aa3e commit c16a1f2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/antunit/TestCommonsIOSignatures.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
inline="true" conf="master" type="jar" pathid="commons-io.classpath" log="${ivy.logging}"/>
4343
<ac:foreach param="commons-version" target="-check-version-equivalent" inheritall="true" inheritrefs="true" delimiter="/" list="2.10.00/2.10/2.010"/>
4444
<ac:foreach param="commons-version" target="-check-version-downgrade" inheritall="true" inheritrefs="true" delimiter="/" list="2.10.1/2.010.1/2.10.02"/>
45+
<ac:foreach param="commons-version" target="-check-version-notfound" inheritall="true" inheritrefs="true" delimiter="/" list="9.x/x.y/0.x/"/>
4546
</target>
4647

4748
<target name="-check-version-equivalent">
@@ -56,4 +57,10 @@
5657
<au:assertLogContains level="warning" text="Bundled signatures 'commons-io-unsafe-${commons-version}' not found, choosing next lower available signature: commons-io-unsafe-2.10.0"/>
5758
</target>
5859

60+
<target name="-check-version-notfound">
61+
<au:expectfailure expectedMessage="IO problem while reading files with API signatures: Bundled signatures resource not found: commons-io-unsafe-${commons-version}">
62+
<forbiddenapis bundledSignatures="commons-io-unsafe-${commons-version}" ignoreEmptyFileset="true" classpathref="commons-io.classpath" targetVersion="${jdk.version}"/>
63+
</au:expectfailure>
64+
</target>
65+
5966
</project>

0 commit comments

Comments
 (0)