1 23 24 package com.rift.coad.lib.thirdparty.ant; 25 26 import junit.framework.*; 27 import java.io.File ; 28 import org.apache.tools.ant.BuildException; 29 import org.apache.tools.ant.Project; 30 import org.apache.tools.ant.Target; 31 import org.apache.tools.ant.taskdefs.Jar; 32 import org.apache.tools.ant.types.Path; 33 import org.apache.tools.ant.taskdefs.LogOutputStream; 34 import org.apache.tools.ant.util.TeeOutputStream; 35 import org.apache.tools.ant.BuildEvent; 36 37 41 public class JARTest extends TestCase { 42 43 public JARTest(String testName) { 44 super(testName); 45 } 46 47 protected void setUp() throws Exception { 48 } 49 50 protected void tearDown() throws Exception { 51 } 52 53 public static Test suite() { 54 TestSuite suite = new TestSuite(JARTest.class); 55 56 return suite; 57 } 58 59 62 public void testArchive() throws Exception { 63 System.out.println("archive"); 64 65 File buildDir = new File (System.getProperty("build.dir")); 66 File jarFile = new File (System.getProperty("test.tmp.dir") + 67 "/build.jar"); 68 69 JAR instance = new JAR(buildDir,jarFile); 70 71 instance.archive(); 72 73 } 74 75 } 76 | Popular Tags |