diff --git a/main/tests/server/src/com/google/refine/tests/expr/functions/html/ParseHtmlTests.java b/main/tests/server/src/com/google/refine/tests/expr/functions/html/ParseHtmlTests.java
index 8edf4775c..0442acb1b 100644
--- a/main/tests/server/src/com/google/refine/tests/expr/functions/html/ParseHtmlTests.java
+++ b/main/tests/server/src/com/google/refine/tests/expr/functions/html/ParseHtmlTests.java
@@ -1,5 +1,6 @@
package com.google.refine.tests.expr.functions.html;
+import org.jsoup.Jsoup;
import org.testng.annotations.Test;
import java.util.Properties;
@@ -26,7 +27,7 @@ public class ParseHtmlTests extends RefineTest {
"
\n" +
" head1
\n" +
" \n" +
- "
para1
\n" +
+ "
para1 strong text
\n" +
"
para2
\n" +
"
\n" +
" \n" +
@@ -74,6 +75,11 @@ public class ParseHtmlTests extends RefineTest {
public void testParseHtml() {
Assert.assertTrue(invoke("parseHtml") instanceof EvalError);
Assert.assertTrue(invoke("parseHtml","h") instanceof org.jsoup.nodes.Document);
+ Assert.assertTrue(invoke("select",Jsoup.parse(h),"p") instanceof org.jsoup.select.Elements);
+ Assert.assertTrue(invoke("innerHtml",Jsoup.parse(h).select("p").first()) instanceof String);
+ Assert.assertEquals(invoke("innerHtml",Jsoup.parse(h).select("p").first()),"para1 strong text");
+ Assert.assertEquals(invoke("htmlAttr",Jsoup.parse(h).select("div").first(),"class"),"class1");
+ Assert.assertEquals(invoke("ownText",Jsoup.parse(h).select("p").first()),"para1");
}
}
diff --git a/main/tests/server/src/com/google/refine/tests/expr/functions/xml/OwnTextTests.java b/main/tests/server/src/com/google/refine/tests/expr/functions/xml/OwnTextTests.java
index f1b7c688b..e699ba829 100644
--- a/main/tests/server/src/com/google/refine/tests/expr/functions/xml/OwnTextTests.java
+++ b/main/tests/server/src/com/google/refine/tests/expr/functions/xml/OwnTextTests.java
@@ -1,8 +1,8 @@
-package com.google.refine.tests.expr.functions.html;
+package com.google.refine.tests.expr.functions.xml;
import org.testng.annotations.Test;
-import com.google.refine.expr.functions.html.OwnText;
+import com.google.refine.expr.functions.xml.OwnText;
import com.google.refine.tests.util.TestUtils;
public class OwnTextTests {
diff --git a/main/tests/server/src/com/google/refine/tests/expr/functions/xml/ParseXmlTests.java b/main/tests/server/src/com/google/refine/tests/expr/functions/xml/ParseXmlTests.java
index 8da1d99fb..c1babf345 100644
--- a/main/tests/server/src/com/google/refine/tests/expr/functions/xml/ParseXmlTests.java
+++ b/main/tests/server/src/com/google/refine/tests/expr/functions/xml/ParseXmlTests.java
@@ -1,5 +1,7 @@
package com.google.refine.tests.expr.functions.xml;
+import org.jsoup.parser.Parser;
+import org.jsoup.Jsoup;
import org.testng.annotations.Test;
import java.util.Properties;
@@ -80,6 +82,10 @@ public class ParseXmlTests extends RefineTest {
public void testParseXml() {
Assert.assertTrue(invoke("parseXml") instanceof EvalError);
Assert.assertTrue(invoke("parseXml","x") instanceof org.jsoup.nodes.Document);
+ Assert.assertTrue(invoke("select",Jsoup.parse(x,"",Parser.xmlParser()),"foaf|Person") instanceof org.jsoup.select.Elements);
+ Assert.assertEquals(invoke("innerXml",Jsoup.parse(x,"",Parser.xmlParser()).select("foaf|Person").first()),"\n John Doe\n\n\n head1\n\n\n head2\n\n\n body1\n\n");
+ Assert.assertEquals(invoke("xmlAttr",Jsoup.parse(x,"",Parser.xmlParser()).select("foaf|homepage").first(),"rdf:resource"),"http://www.example.com");
+ Assert.assertEquals(invoke("ownText",Jsoup.parse(x,"",Parser.xmlParser()).select("BODY").first()),"body1");
}
}