-
-
Save 2shortplanks/929ef1375a5a02b4f15d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/t/mojo/dom.t b/t/mojo/dom.t | |
index cc7205b..1f679df 100644 | |
--- a/t/mojo/dom.t | |
+++ b/t/mojo/dom.t | |
@@ -5,7 +5,7 @@ use warnings; | |
use utf8; | |
-use Test::More tests => 317; | |
+use Test::More tests => 323; | |
# Homer gave me a kidney: it wasn't his, I didn't need it, | |
# and it came postage due- but I appreciated the gesture! | |
@@ -178,6 +178,15 @@ is $dom->at('[foo="bar"]')->text, 'works', 'right text'; | |
is $dom->at('[foo="ba"]'), undef, 'no result'; | |
is $dom->at('.tset')->text, 'works', 'right text'; | |
+# Entities for delimiters | |
+$dom->parse(qq/<DIV id="test" foo='bar' class='tset' answer="42">works<\/DIV>/); | |
+is $dom->at('#test')->text, 'works', 'right text'; | |
+is $dom->at('div')->text, 'works', 'right text'; | |
+is $dom->at('[foo="bar"]')->text, 'works', 'right text'; | |
+is $dom->at('[answer="42"]')->text, 'works', 'right text'; | |
+is $dom->at('[foo="ba"]'), undef, 'no result'; | |
+is $dom->at('.tset')->text, 'works', 'right text'; | |
+ | |
# Already decoded unicode snowman and quotes in selector | |
$dom->parse('<div id="sno"wman"><E2><98><83></div>'); | |
is $dom->at('[id="sno\"wman"]')->text, '<E2><98><83>', 'right text'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment