@@ -325,7 +325,7 @@ subtest 'Patterns', {
325
325
subtest ' issue#60' => {
326
326
use LibXML::Reader;
327
327
328
- my $ string = q : to<END>;
328
+ my $ string = q : to<END>.lines>>.trim.join ;
329
329
<foo>
330
330
<!--Comment-->Text<Pfx : Elem xmlns: Pfx= " foo" />
331
331
<![CDATA[Cdata]] >
@@ -334,19 +334,24 @@ subtest 'issue#60' => {
334
334
335
335
my @ results ;
336
336
337
- my LibXML::Reader $ reader .= new (: $ string , :! blanks );
337
+ my LibXML::Reader $ reader .= new (: $ string );
338
338
339
339
lives-ok {
340
340
while $ reader . read {
341
- @ results . push ([$ reader . value , $ reader . nodeType, $ reader . name , $ reader . localName, $ reader . prefix ]);
341
+ my $ v = $ reader . value ;
342
+ my $ t = $ reader . nodeType;
343
+ my $ n = $ reader . name ;
344
+ my $ ln = $ reader . localName;
345
+ my $ p = $ reader . prefix ;
346
+ @ results . push : (: $ v , : $ t , : $ n , : $ ln , : $ p );
342
347
}
343
348
}
344
349
is-deeply @ results , [
345
- [ Str , 1 , " foo" , " foo" , Str ] ,
346
- [ " Comment" , 8 , " #comment" , " #comment" , Str ] ,
347
- [ " Text" , 3 , " #text" , " #text" , Str ] ,
348
- [ Str , 1 , " Pfx:Elem" , " Elem" , " Pfx" ] ,
349
- [ " Cdata" , 4 , " #cdata-section" , " #cdata-section" , Str ] ,
350
- [ Str , 15 , " foo" , " foo" , Str ]
350
+ ( : v( Str ), : t( 1 ), : n< foo >, : ln< foo >, : p( Str )) ,
351
+ ( : v< Comment >, : t( 8 ), : n< #comment >, : ln< #comment >, : p( Str )) ,
352
+ ( : v< Text >, : t( 3 ), : n< #text >, : ln< #text >, : p( Str )) ,
353
+ ( : v( Str ), : t( 1 ), : n< Pfx:Elem >, : ln< Elem >, : p< Pfx >) ,
354
+ ( : v< Cdata >, : t( 4 ), : n< #cdata-section >, : ln< #cdata-section >, : p( Str )) ,
355
+ ( : v( Str ), : t( 15 ), : n< foo >, : ln< foo >, : p( Str ))
351
356
]
352
357
}
0 commit comments