File: 11tag-in-different-locations.t

package info (click to toggle)
libxml-semanticdiff-perl 1.00.00-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 232 kB
  • sloc: perl: 535; xml: 532; makefile: 13
file content (46 lines) | stat: -rw-r--r-- 1,365 bytes parent folder | download | duplicates (2)
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
42
43
44
45
46
use strict;
use warnings;

use Test::More tests => 1;

use XML::SemanticDiff;

my $orig = <<'EOF';
<LocalPresentationManifest xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Properties>
    <Description>This presentation is a brief overview of the MediaLandscape Product and Serivce Offerings.</Description>
    <TimeZone>
      <Identifier>19</Identifier>
      <Name>Central Time</Name>
      <Description>(GMT-06:00) Central Time (US &amp; Canada)</Description>
      <Abbreviation>CST</Abbreviation>
    </TimeZone>
  </Properties>
</LocalPresentationManifest>
EOF

my $derived = <<'EOF';
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<LocalPresentationManifest>
  <Properties>
    <TimeZone>
      <Description>(GMT-06:00) Central Time (US &amp; Canada)</Description>
      <Abbreviation>CST</Abbreviation>
      <Identifier>19</Identifier>
      <Name>Central Time</Name>
    </TimeZone>
    <Description>This presentation is a brief overview of the MediaLandscape Product and Serivce Offerings.</Description>
  </Properties>
</LocalPresentationManifest>
EOF

my $diff = XML::SemanticDiff->new();

my @results = $diff->compare($orig, $derived);

# TEST
is_deeply (
    \@results, 
    [], 
    "Making sure two XMLs with variation of tag locations are considered identical - per bug #18491"
);