Used another XPath expression in the test to make it more robust.

This commit is contained in:
Alex Schroeder
2013-08-21 11:49:33 +02:00
parent 978cfc6162
commit 27459b2280

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env perl
# Copyright (C) 2008 Weakish Jiang <weakish@gmail.com>
# Copyright (C) 2009 Alex Schroeder <alex@gnu.com>
# Copyright (C) 2009-2013 Alex Schroeder <alex@gnu.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
@@ -56,8 +56,6 @@ H<sub>2</sub>O
<dl><dt><strong>dt1</strong></dt><dd>dd1</dd></dl>
; {{{dt1}}}\n:dd1
<dl><dt><code>dt1</code></dt><dd>dd1</dd></dl>
;[[http://www.toto.com|toto]] \n :Site of my friend Toto
<dl><dt><a class="url http outside" href="http://www.toto.com">toto</a></dt><dd>Site of my friend Toto</dd></dl>
; {{{[[http://www.toto.com|toto]]}}} \n : Site of my friend Toto
<dl><dt><code>[[http://www.toto.com|toto]]</code></dt><dd>Site of my friend Toto</dd></dl>
; what if we have {{{[[http://example.com]]}}} and {{{[[ftp://example.org]]}}}\n: And {{{[[http://example.net]]}}}
@@ -75,6 +73,8 @@ H<sub>2</sub>O
EOT
xpath_run_tests(split('\n',<<'EOT'));
;[[http://www.toto.com|toto]] \n :Site of my friend Toto
//dl/dt[a[@class="url http outside"][@href="http://www.toto.com"][text()="toto"]]/following-sibling::dd[text()="Site of my friend Toto"]
##http://example.com##
//code/a[@class="url http"][@href="http://example.com"][text()="http://example.com"]
##[[wiki page]] will work##