https://issues.apache.org/bugzilla/show_bug.cgi?id=52332
Bug #: 52332
Summary: assertResourceExists fails using ANT 1.7.1
Product: Ant
Version: 1.2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: AntUnit
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
Created attachment 28071
--> https://issues.apache.org/bugzilla/attachment.cgi?id=28071
Ant Unit test
Hello,
We recently moved to AntUnit 1.2 using Ant 1.7.1, and an AntUnit test that used
to work is failing:
...
[au:antunit] ------------- ---------------- ---------------
[au:antunit] Target: test-assertions FAILED
[au:antunit] at line 178, column 56
[au:antunit] Message: Expected resource 'test.properties' to exist
[au:antunit] took 0.016 sec
...
In fact you can use the example in the AntUnit documentation with Ant 1.7.1 and
it will fail:
----------------------------------------------------------------------------
assertResourceExists
Since AntUnit 1.2
Asserts that a given resource exists. This is a generalization of
assertFileExists and allows to test for arbitrary resources.
Attribute Description Required
resource Location of the resource. Yes
message Message for the exception if the condition doesn't hold true. Defaults
to "Expected resource 'resource' to exist". No.
Examples
Make the build fail if the resource ${ant.home}/lib/ant.jar doesn't exist:
<assertResourceExists resource="${ant.home}/lib/ant.jar"/>
----------------------------------------------------------------------------
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.