- Add optional msg attribute to assertFileExists and assertEquals tags
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114911 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -277,14 +277,18 @@
|
||||
<define:taglib uri="assert">
|
||||
<define:tag name="assertFileExists">
|
||||
<!-- @file : Full file path -->
|
||||
<!-- @msg : optional message to be displayed -->
|
||||
<u:file var="fileAsFile" name="${file}"/>
|
||||
<j:if test="${!(fileAsFile.exists())}">
|
||||
<ant:fail>${file} does not exist</ant:fail>
|
||||
<ant:fail>${file} does not exist.${msg}</ant:fail>
|
||||
</j:if>
|
||||
</define:tag>
|
||||
<define:tag name="assertEquals">
|
||||
<!-- @expected : the expected value -->
|
||||
<!-- @actual : the actual value -->
|
||||
<!-- @msg : optional message to be displayed -->
|
||||
<j:if test="${not(expected.equals(value))}">
|
||||
<ant:fail>Expected [${expected}] but got [${value}]</ant:fail>
|
||||
<ant:fail>Expected [${expected}] but got [${value}].${msg}</ant:fail>
|
||||
</j:if>
|
||||
</define:tag>
|
||||
</define:taglib>
|
||||
|
||||
Reference in New Issue
Block a user