Added new <code>assert:assertFileContains</code> tag that verifies if a file contains a specific string.
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@156960 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
1 parent
e6048460ef
commit
596fb953b0
4 files changed
+47
-11
No files matched your search
@@ -17,12 +17,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
-->
|
||||
<project xmlns:assert="assert"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util">
|
||||
<project default="testPlugin"
|
||||
xmlns:assert="assert"
|
||||
xmlns:j="jelly:core"
|
||||
xmlns:u="jelly:util"
|
||||
xmlns:ant="jelly:ant">
|
||||
|
||||
<goal name="testPlugin" prereqs="test-generate-docs">
|
||||
<attainGoal name="clean"/>
|
||||
<goal name="testPlugin" prereqs="clean">
|
||||
<attainGoal name="test-assertFileContains"/>
|
||||
<attainGoal name="test-generate-docs"/>
|
||||
</goal>
|
||||
|
||||
<goal name="test-generate-docs">
|
||||
@@ -30,11 +33,20 @@
|
||||
|
||||
<assert:assertFileExists file="${maven.docs.src}"/>
|
||||
|
||||
<u:tokenize var="fileList" delim=",">navigation.xml,goals.xml,properties.xml,tags.xml</u:tokenize>
|
||||
<u:tokenize var="fileList" delim=",">navigation.xml,goals.xml,properties.xml,tags.xml</u:tokenize>
|
||||
|
||||
<j:forEach var="file" items="${fileList}">
|
||||
<assert:assertFileExists file="${maven.docs.src}/${file}"/>
|
||||
<j:forEach var="file" items="${fileList}">
|
||||
<assert:assertFileExists file="${maven.docs.src}/${file}"/>
|
||||
</j:forEach>
|
||||
<delete dir="${maven.docs.src}"/>
|
||||
|
||||
</goal>
|
||||
|
||||
<goal name="test-assertFileContains">
|
||||
<ant:mkdir dir="${maven.build.dir}"/>
|
||||
<j:file name="${maven.build.dir}/testAssertFileContains.txt">This is a test blah blah...</j:file>
|
||||
<assert:assertFileContains file="${maven.build.dir}/testAssertFileContains.txt"
|
||||
match="a test"/>
|
||||
</goal>
|
||||
|
||||
</project>
|
||||
Reference in new issue
Block a user