We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cfd3e2 commit 73e4350Copy full SHA for 73e4350
t/00ast.t
@@ -8,7 +8,7 @@ use LibXML::Item :&ast-to-xml;
8
use LibXML::Config;
9
use LibXML::Raw;
10
11
-plan 11;
+plan 13;
12
13
LibXML::Config.keep-blanks = False; # Make it the test default
14
my LibXML::Element $elem .= new('Test', config => LibXML::Config.new);
@@ -59,4 +59,10 @@ is-deeply $doc.ast, "#xml" => [ :$dromedaries ];
59
$doc<dromedaries><species>[0].replaceNode: ast-to-xml('#comment' => 'youza');
60
is $doc<dromedaries><comment()>, '<!--youza-->';
61
62
+my $string = '<Foo bar="x"><bar bar="bar">bar</bar></Foo>';
63
+$doc .= parse: :$string;
64
+is-deeply $doc.ast, "#xml" => [:Foo[:bar<x>, :bar[:bar<bar>, 'bar']]];
65
+
66
+is $doc.ast.&ast-to-xml().root.Str, $string;
67
68
done-testing;
0 commit comments