[HtmlUnit] SVN: [14144] trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/ cyberneko/FragmentContextStackTest.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[HtmlUnit] SVN: [14144] trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/ cyberneko/FragmentContextStackTest.java

rbri
Revision: 14144
          http://sourceforge.net/p/htmlunit/code/14144
Author:   rbri
Date:     2017-04-20 20:35:59 +0000 (Thu, 20 Apr 2017)
Log Message:
-----------
make test platform independent

Modified Paths:
--------------
    trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/cyberneko/FragmentContextStackTest.java

Modified: trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/cyberneko/FragmentContextStackTest.java
===================================================================
--- trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/cyberneko/FragmentContextStackTest.java 2017-04-20 20:24:33 UTC (rev 14143)
+++ trunk/neko-htmlunit/src/test/java/net/sourceforge/htmlunit/cyberneko/FragmentContextStackTest.java 2017-04-20 20:35:59 UTC (rev 14144)
@@ -3,11 +3,11 @@
 import java.io.StringReader;
 import java.io.StringWriter;
 
-import junit.framework.TestCase;
-
 import org.apache.xerces.xni.QName;
 import org.apache.xerces.xni.parser.XMLDocumentFilter;
 import org.apache.xerces.xni.parser.XMLInputSource;
+
+import junit.framework.TestCase;
 import net.sourceforge.htmlunit.cyberneko.parsers.DOMParser;
 
 /**
@@ -19,12 +19,14 @@
  */
 public class FragmentContextStackTest extends TestCase {
 
+    private static final String NL = System.lineSeparator();
+
     public void testSimple() throws Exception {
-        String expected = "(DIV\r\n"
-            + "(SPAN\r\n"
-            + "\"hello\r\n"
-            + ")SPAN\r\n"
-            + ")DIV\r\n";
+        String expected = "(DIV" + NL
+            + "(SPAN" + NL
+            + "\"hello" + NL
+            + ")SPAN" + NL
+            + ")DIV" + NL;
         doTest("<div><span>hello</span>", new String[] { "html", "body" }, expected);
 
         doTest("<div><span>hello</span>", new String[] { "html" }, expected);
@@ -34,13 +36,13 @@
     }
 
     public void testTR() throws Exception {
-        String expected = "(TR\r\n"
-            + "(TD\r\n"
-            + "\"hello\r\n"
-            + ")TD\r\n"
-            + ")TR\r\n";
+        String expected = "(TR" + NL
+            + "(TD" + NL
+            + "\"hello" + NL
+            + ")TD" + NL
+            + ")TR" + NL;
         doTest("<tr><td>hello</td></tr>", new String[] { "html", "body", "table", "tbody" }, expected);
-        expected = "(TBODY\r\n"
+        expected = "(TBODY" + NL
             + expected
             + ")TBODY\n";
         doTest("<tr><td>hello</td></tr>", new String[] { "html", "body", "table" }, expected);


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...