Author: vsiveton
Date: Wed Mar 4 21:54:40 2009
New Revision: 750176
URL: http://svn.apache.org/viewvc?rev=750176&view=rev
Log:
o merged r736045 (SHINDIG-873 | Patch from Vincent Siveton | Fix Neko test on
windows)
Modified:
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParserAndSerializeTest.java
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParsersTest.java
Modified:
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParserAndSerializeTest.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParserAndSerializeTest.java?rev=750176&r1=750175&r2=750176&view=diff
==============================================================================
---
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParserAndSerializeTest.java
(original)
+++
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParserAndSerializeTest.java
Wed Mar 4 21:54:40 2009
@@ -18,6 +18,7 @@
package org.apache.shindig.gadgets.parse.nekohtml;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.shindig.gadgets.parse.GadgetHtmlParser;
import org.apache.shindig.gadgets.parse.HtmlSerializer;
import org.apache.shindig.gadgets.parse.ParseModule;
@@ -30,6 +31,9 @@
*/
public class NekoParserAndSerializeTest extends TestCase {
+ /** The vm line separator */
+ private static final String EOL = System.getProperty( "line.separator" );
+
private NekoSimplifiedHtmlParser simple = new NekoSimplifiedHtmlParser(
new ParseModule.DOMImplementationProvider().get());
private NekoHtmlParser full = new NekoHtmlParser(
@@ -77,6 +81,7 @@
private void parseAndCompareBalanced(String content, String expected,
GadgetHtmlParser parser)
throws Exception {
Document document = parser.parseDom(content);
+ expected = StringUtils.replace(expected, EOL, "\n");
assertEquals(expected, HtmlSerializer.serialize(document));
}
}
Modified:
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParsersTest.java
URL:
http://svn.apache.org/viewvc/incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParsersTest.java?rev=750176&r1=750175&r2=750176&view=diff
==============================================================================
---
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParsersTest.java
(original)
+++
incubator/shindig/branches/1.0.x-incubating/java/gadgets/src/test/java/org/apache/shindig/gadgets/parse/nekohtml/NekoParsersTest.java
Wed Mar 4 21:54:40 2009
@@ -22,6 +22,7 @@
import org.apache.shindig.gadgets.parse.ParseModule;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
import org.w3c.dom.Document;
import junit.framework.TestCase;
@@ -31,6 +32,9 @@
*/
public class NekoParsersTest extends TestCase {
+ /** The vm line separator */
+ private static final String EOL = System.getProperty( "line.separator" );
+
private NekoSimplifiedHtmlParser simple = new NekoSimplifiedHtmlParser(
new ParseModule.DOMImplementationProvider().get());
private NekoHtmlParser full = new NekoHtmlParser(
@@ -78,6 +82,7 @@
private void parseAndCompareBalanced(String content, String expected,
GadgetHtmlParser parser)
throws Exception {
Document document = parser.parseDom(content);
+ expected = StringUtils.replace(expected, EOL, "\n");
assertEquals(expected, HtmlSerializer.serialize(document));
}
}