You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2005/06/07 22:38:41 UTC
cvs commit: ant/src/testcases/org/apache/tools/ant/taskdefs LibrariesTest.java
stevel 2005/06/07 13:38:41
Modified: src/testcases/org/apache/tools/ant/taskdefs
LibrariesTest.java
Log:
remove log level for a better example
Revision Changes Path
1.6 +18 -3 ant/src/testcases/org/apache/tools/ant/taskdefs/LibrariesTest.java
Index: LibrariesTest.java
===================================================================
RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/LibrariesTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- LibrariesTest.java 21 Jan 2005 07:12:52 -0000 1.5
+++ LibrariesTest.java 7 Jun 2005 20:38:41 -0000 1.6
@@ -20,6 +20,7 @@
import org.apache.tools.ant.taskdefs.repository.AssertDownloaded;
import org.apache.tools.ant.taskdefs.repository.Libraries;
import org.apache.tools.ant.taskdefs.repository.Library;
+import org.apache.tools.ant.taskdefs.repository.Maven2Layout;
/**
* test the test libraries stuff.
@@ -37,7 +38,6 @@
configureProject(TASKDEFS_DIR + "libraries.xml");
}
-
protected boolean offline() {
return "true".equals(System.getProperty("offline"));
}
@@ -103,7 +103,7 @@
/**
* exec a target if we are online; expect an eception
* @param target
- * @param cause caue of the faule
+ * @param cause cause of the fault
* @param message
*/
private void expectExceptionIfOnline(String target, String cause,String message) {
@@ -116,7 +116,6 @@
public void testRenaming() {
execIfOnline("testRenaming");
-
}
public void testOverwrite() {
@@ -207,4 +206,20 @@
public void testFlatten() {
execIfOnline("testFlatten");
}
+
+ public void testMavenNaming() {
+ Library lib=new Library();
+ lib.setProject("unknown");
+ lib.setArchive("test");
+ lib.setVersion("3.4");
+ assertEquals(".jar",lib.getSuffix());
+ assertNull("lib.getClassifier()!=null", lib.getClassifier());
+ String shortname=Maven2Layout.createFilename(lib);
+ assertEquals("test-3.4.jar",shortname);
+ //add a classifierand test that works
+ lib.setClassifier("src");
+ assertNotNull("lib.getClassifier()==null", lib.getClassifier());
+ shortname = Maven2Layout.createFilename(lib);
+ assertEquals("test-3.4-src.jar", shortname);
+ }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org