| 1 | # -*- perl -*- | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | require Exporter; | |||||||||
| 5 | |||||||||||
| 6 | package XML::EP::Test; | ||||||||||
| 7 | |||||||||||
| 8 | 1 | @XML::EP::Test::ISA = qw(Exporter); | |||||||||
| 9 | 1 | @XML::EP::Test::EXPORT_OK = qw(Test XmlCmp); | |||||||||
| 10 | |||||||||||
| 11 | 1 | $XML::EP::Test::VERSION = '0.01'; | |||||||||
| 12 | |||||||||||
| 13 | 1 | my $currentTest = 0; | |||||||||
| 14 | 0 | ▶ | sub Test { | ||||||||
|
Subroutine
Test: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 15 | 0 | my $result = shift; my $msg = shift; | |||||||||
| 16 | 0 | ▶ | $msg = "" unless defined $msg; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | ▶ | $msg = " $msg" unless $msg eq ""; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | 0 | ++$currentTest; | |||||||||
| 19 | 0 | ▶ | if ($result) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | print "ok $currentTest$msg\n"; | |||||||||
| 21 | } else { | ||||||||||
| 22 | 0 | print "not ok $currentTest$msg\n"; | |||||||||
| 23 | } | ||||||||||
| 24 | 0 | $result; | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub XmlCmp { | ||||||||
|
Subroutine
XmlCmp: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||
| 28 | 0 | my $a = shift; my $b = shift; my $attr = { @_ }; | |||||||||
| 29 | 0 | ▶ | unless ($attr->{'keepws'}) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | $a =~ s/^\s+//mg; | |||||||||
| 31 | 0 | $a =~ s/\s+$//mg; | |||||||||
| 32 | 0 | $b =~ s/^\s+//mg; | |||||||||
| 33 | 0 | $b =~ s/\s+$//mg; | |||||||||
| 34 | } | ||||||||||
| 35 | 0 | ▶ | Test($a eq $b) or print "Expected:\n$b\nGot:\n$a\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | |||||||||||
| 39 | 1 | 1; | |||||||||