Skip to content

Commit 683db09

Browse files
committed
Complete testXPath2 assertion.
1 parent 2f71f79 commit 683db09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

webmagic-saxon/src/test/java/us/codecraft/webmagic/selector/XpathSelectorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.junit.Assert;
99
import org.junit.Ignore;
1010
import org.junit.Test;
11+
1112
import us.codecraft.xsoup.XPathEvaluator;
1213
import us.codecraft.xsoup.Xsoup;
1314

@@ -1368,7 +1369,7 @@ public void testXPath2() {
13681369
String text = "<h1>眉山:扎实推进农业农村工作 促农持续增收<br>\n" +
13691370
"<span>2013-07-31 23:29:45&nbsp;&nbsp;&nbsp;来源:<a href=\"http://www.mshw.net\" target=\"_blank\" style=\"color:#AAA\">眉山网</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;责任编辑:张斯炜</span></h1>";
13701371
XpathSelector xpathSelector = new XpathSelector("//h1/text()");
1371-
System.out.println(xpathSelector.select(text));
1372+
Assert.assertEquals("眉山:扎实推进农业农村工作 促农持续增收 ", xpathSelector.select(text));
13721373
}
13731374

13741375
@Test

0 commit comments

Comments
 (0)