Browse Source

Testcase for PR 23639

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275435 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
7e0d189209
2 changed files with 7 additions and 2 deletions
  1. +2
    -1
      src/etc/testcases/taskdefs/war.xml
  2. +5
    -1
      src/testcases/org/apache/tools/ant/taskdefs/WarTest.java

+ 2
- 1
src/etc/testcases/taskdefs/war.xml View File

@@ -12,10 +12,11 @@
</target>
<target name="testlibrefs" depends="setup">
<fileset id="test" dir="." includes="foobar"/>
<fileset id="test" dir="." includes="war.xml"/>
<war webxml="war.xml" destfile="${working.dir}/test.war">
<lib refid="test"/>
</war>
<unzip src="${working.dir}/test.war" dest="${working.dir}"/>
</target>
<target name="clean">


+ 5
- 1
src/testcases/org/apache/tools/ant/taskdefs/WarTest.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2002 The Apache Software Foundation. All rights
* Copyright (c) 2002-2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,8 @@

package org.apache.tools.ant.taskdefs;

import java.io.File;

import org.apache.tools.ant.BuildFileTest;

/**
@@ -82,5 +84,7 @@ public class WarTest extends BuildFileTest {
*/
public void testLibRefs() {
executeTarget("testlibrefs");
File f = getProject().resolveFile("working/WEB-INF/lib/war.xml");
assertTrue("File has been put into lib", f.exists());
}
}

Loading…
Cancel
Save