Author: maartenc
Date: Thu Mar 20 13:37:28 2008
New Revision: 639445
URL: http://svn.apache.org/viewvc?rev=639445&view=rev
Log:
Reverted last commit and modified the code so it will compile with JDK1.4 and
is more consistent with the EOL checks in other tests.
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParserTester.java
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParserTester.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParserTester.java?rev=639445&r1=639444&r2=639445&view=diff
==============================================================================
---
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParserTester.java
(original)
+++
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/AbstractModuleDescriptorParserTester.java
Thu Mar 20 13:37:28 2008
@@ -57,30 +57,6 @@
assertTrue("artifact not found: " + artifactsNames[i], found);
}
}
-
-
- protected static String convertEOL(String str) {
- StringBuffer buffer = new StringBuffer();
-
- char[] chars = str.toCharArray();
- char last = ' ';
- for (int i = 0; i < chars.length; i++) {
- if ((chars[i] == '\r') && (last == '\n')) {
- last = '\r';
- continue;
- }
- if (chars[i] == '\r') {
- buffer.append('\n');
- } else {
- buffer.append(chars[i]);
- }
- last = chars[i];
- }
-
- return buffer.toString();
- }
-
-
protected void assertDependencyArtifacts(DependencyDescriptor dd, String[]
confs,
String[] artifactsNames) {
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java?rev=639445&r1=639444&r2=639445&view=diff
==============================================================================
---
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
(original)
+++
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorParserTest.java
Thu Mar 20 13:37:28 2008
@@ -478,7 +478,7 @@
+ "framework. It is designed\n as a
light-weight, event-driven component "
+ "technology that handles communication with disparate
systems\n "
+ "transparently providing a simple component
interface.",
- convertEOL(md.getDescription()));
+ md.getDescription().replaceAll("\r\n",
"\n").replace('\r', '\n'));
}
public void testDependencyManagment() throws ParseException, IOException {
Modified:
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
URL:
http://svn.apache.org/viewvc/ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java?rev=639445&r1=639444&r2=639445&view=diff
==============================================================================
---
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
(original)
+++
ant/ivy/core/trunk/test/java/org/apache/ivy/plugins/parser/xml/XmlModuleDescriptorParserTest.java
Thu Mar 20 13:37:28 2008
@@ -207,7 +207,7 @@
assertEquals("This module is <b>great</b> !<br/>\n\t"
+ "You can use it especially with myconf1 and myconf2, "
+ "and myconf4 is not too bad too.",
- convertEOL(md.getDescription()));
+ md.getDescription().replaceAll("\r\n",
"\n").replace('\r', '\n'));
assertEquals(1, md.getExtraInfo().size());
assertEquals("56576", md.getExtraInfo().get("e:someExtra"));