File: force_case_bug_fix.t

package info (click to toggle)
libxml-smart-perl 1.78-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 784 kB
  • sloc: perl: 3,644; makefile: 2
file content (41 lines) | stat: -rw-r--r-- 730 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!perl -T
use 5.006                   ;
use strict                  ;
use warnings FATAL => 'all' ;
use Test::More              ;

use XML::Smart              ;  


my @xml = <DATA>            ;
my $xml = join( '', @xml )  ;

subtest 'Force case' => sub {

    my $XML1 = new XML::Smart ( $xml,
				lowarg => 1,
				lowtag => 1,
	); 

    my $XML2 = new XML::Smart ( $xml,
				lowarg => 1,
				lowtag => 1,
	); 

    my $data = $XML1->tree()->{ note }{ to }{ CONTENT } ;

    cmp_ok( $data, 'eq', 'Tove', 'Force to downcase: bug id 17834' );
    done_testing() ;

};

done_testing() ;


__DATA__
<note>
    <TO>Tove</TO>
    <from>Jani</from>
    <heading>Reminder</heading>
    <BODY>Don't forget me this weekend!</BODY>
</note>