| @@ -105,7 +105,7 @@ | |||||
| <project name="master"> | <project name="master"> | ||||
| <include file="compile-java.xml" as="compile"/> | <include file="compile-java.xml" as="compile"/> | ||||
| </project>]]></echo> | </project>]]></echo> | ||||
| <!-- here prefix should be concatened from each include first | |||||
| <!-- here prefix should be concatenated from each include first | |||||
| "compile" then "abstract-compile"--> | "compile" then "abstract-compile"--> | ||||
| <ant dir="${output}" target="compile.abstract-compile.compile"/> | <ant dir="${output}" target="compile.abstract-compile.compile"/> | ||||
| <au:assertLogContains text="in compile java"/> | <au:assertLogContains text="in compile java"/> | ||||
| @@ -23,6 +23,7 @@ import static org.junit.Assert.assertEquals; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.types.Parameter; | import org.apache.tools.ant.types.Parameter; | ||||
| import org.junit.Before; | import org.junit.Before; | ||||
| import org.junit.Ignore; | |||||
| import org.junit.Rule; | import org.junit.Rule; | ||||
| import org.junit.Test; | import org.junit.Test; | ||||
| import org.junit.rules.ExpectedException; | import org.junit.rules.ExpectedException; | ||||
| @@ -82,14 +83,13 @@ public class FilenameSelectorTest { | |||||
| assertEquals("FFFFFFFFFFFF", selectorRule.selectionString(s)); | assertEquals("FFFFFFFFFFFF", selectorRule.selectionString(s)); | ||||
| } | } | ||||
| // This is turned off temporarily. There appears to be a bug | |||||
| // in SelectorUtils.matchPattern() where it is recursive on | |||||
| // Windows even if no ** is in pattern. | |||||
| // s.setName("*.gz"); | |||||
| // String results = selectorRule.selectionString(s); | |||||
| // assertEquals("FFFTFFFFFFFF", results); // Unix | |||||
| // vs | |||||
| // assertEquals("FFFTFFFFTFFF", results); // Windows | |||||
| @Ignore("Turned off due to a bug: SelectorUtils.matchPattern() is recursive without '**' on Windows") | |||||
| @Test | |||||
| public void testSelectionBehaviourWildcard() { | |||||
| s.setName("*.gz"); | |||||
| assertEquals("FFFTFFFFFFFF", selectorRule.selectionString(s)); // Unix | |||||
| assertEquals("FFFTFFFFTFFF", selectorRule.selectionString(s)); // Windows | |||||
| } | |||||
| @Test | @Test | ||||
| public void testSelectionBehaviourNegate() { | public void testSelectionBehaviourNegate() { | ||||
| @@ -617,8 +617,8 @@ public class FileUtilsTest { | |||||
| * calling this method allows tests where normalize is called to pass under cygwin | * calling this method allows tests where normalize is called to pass under cygwin | ||||
| */ | */ | ||||
| private void assertEqualsIgnoreDriveCase(String s1, String s2) { | private void assertEqualsIgnoreDriveCase(String s1, String s2) { | ||||
| if ((Os.isFamily("dos") || Os.isFamily("netware")) | |||||
| && !s1.isEmpty() && !s2.isEmpty()) { | |||||
| assumeTrue("Not DOS or Netware", Os.isFamily("dos") || Os.isFamily("netware")); | |||||
| if (!s1.isEmpty() && !s2.isEmpty()) { | |||||
| StringBuilder sb1 = new StringBuilder(s1); | StringBuilder sb1 = new StringBuilder(s1); | ||||
| StringBuilder sb2 = new StringBuilder(s2); | StringBuilder sb2 = new StringBuilder(s2); | ||||
| sb1.setCharAt(0, Character.toUpperCase(s1.charAt(0))); | sb1.setCharAt(0, Character.toUpperCase(s1.charAt(0))); | ||||
| @@ -56,18 +56,18 @@ public class ZipOutputStreamTest { | |||||
| @Test | @Test | ||||
| public void testZipLong() { | public void testZipLong() { | ||||
| ZipLong test = ZipOutputStream.toDosTime(time); | |||||
| ZipLong test = ZipUtil.toDosTime(time); | |||||
| assertEquals(test.getValue(), zl.getValue()); | assertEquals(test.getValue(), zl.getValue()); | ||||
| } | } | ||||
| @Test | @Test | ||||
| public void testAdjustToLong() { | public void testAdjustToLong() { | ||||
| assertEquals((long) Integer.MAX_VALUE, | assertEquals((long) Integer.MAX_VALUE, | ||||
| ZipOutputStream.adjustToLong(Integer.MAX_VALUE)); | |||||
| ZipUtil.adjustToLong(Integer.MAX_VALUE)); | |||||
| assertEquals(((long) Integer.MAX_VALUE) + 1, | assertEquals(((long) Integer.MAX_VALUE) + 1, | ||||
| ZipOutputStream.adjustToLong(Integer.MAX_VALUE + 1)); | |||||
| ZipUtil.adjustToLong(Integer.MAX_VALUE + 1)); | |||||
| assertEquals(2 * ((long) Integer.MAX_VALUE), | assertEquals(2 * ((long) Integer.MAX_VALUE), | ||||
| ZipOutputStream.adjustToLong(2 * Integer.MAX_VALUE)); | |||||
| ZipUtil.adjustToLong(2 * Integer.MAX_VALUE)); | |||||
| } | } | ||||
| } | } | ||||