functional_XML/t/div

filter: Statementstmt 96.8% 62 / 64 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 24 / 24 Podpod n/a totaltotal 95.6% 88 / 92 CC 2 SCAR 0.8
CC
2
Cov
94%
BEGIN
2.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
« lib/FP/Abstract/Compare.pm ↑ Summary lib/FP/Lazy/t.pm »
1 #!/usr/bin/env perl
2  
3 # Copyright (c) 2014-2015 Christian Jaeger, copying@christianjaeger.ch
4 # This is free software. See the file COPYING.md that came bundled
5 # with this file.
6  
7 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings FATAL => 'uninitialized';
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 our ($mydir, $myname);
12  
13 1 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.2
14 1 ▶ $0 =~ /(.*?)([^\/]+)\z/s or die "?";
Branch: 1 branch
BranchTrueFalseTotal
$0 =~ m[(.*?)([^/]+)\z]s or die "?" 1 0 1
15 1 ($mydir, $myname) = ($1, $2);
16 }
17 1 ▶use lib "$mydir/../../lib";
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 1 ▶use Chj::TEST ":all";
Subroutine BEGIN: called CC=1 SCAR=0.0
20 1 ▶use PXML::XHTML ":all";
Subroutine BEGIN: called CC=1 SCAR=0.0
21 1 ▶use PXML::Serialize "pxml_print_fragment_fast";
Subroutine BEGIN: called CC=1 SCAR=0.0
22 1 ▶use FP::Lazy;
Subroutine BEGIN: called CC=1 SCAR=0.0
23 1 ▶use FP::List;
Subroutine BEGIN: called CC=1 SCAR=0.0
24 1 ▶use FP::Stream;
Subroutine BEGIN: called CC=1 SCAR=0.0
25 1 ▶use FP::Array ":all"; # XXX inconsistency in export directives
Subroutine BEGIN: called CC=1 SCAR=0.0
26 1 ▶use FP::PureArray;
Subroutine BEGIN: called CC=1 SCAR=0.0
27  
28 1 ▶TEST_STDOUT {
Subroutine __ANON__: called CC=1 SCAR=0.0
29 pxml_print_fragment_fast(A({ href => "hah" }, "Hello ", I("World", B("!"))),
30 *STDOUT{IO})
31 1 }
32 1 '<a href="hah">Hello <i>World<b>!</b></i></a>';
33  
34 1 ▶TEST {
Subroutine __ANON__: called CC=1 SCAR=0.0
35 1 A(
36 { href => "hah" },
37 "Hello ",
38 I("World", undef, B("!")),
39 cons(" ", string_to_stream("You're great."))
40 )->text
41 }
42 1 'Hello World! You\'re great.';
43  
44 1 ▶TEST { P(list)->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
45 1 '<p></p>';
46  
47 1 ▶TEST { P(list 1, 2, B(3))->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
48 1 '<p>12<b>3</b></p>';
49  
50 1 ▶TEST {
Subroutine __ANON__: called CC=1 SCAR=0.0
51 1 ▶ P(stream 1, 2, lazy { B(3) })->string
Subroutine __ANON__: called CC=1 SCAR=0.0
52 }
53 1 '<p>12<b>3</b></p>';
54  
55 1 ▶TEST { P(array 1, 2, B(3))->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
56 1 '<p>12<b>3</b></p>';
57  
58 1 ▶TEST { P(purearray 1, 2, B(3))->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
59 1 '<p>12<b>3</b></p>';
60  
61 1 ▶TEST { P(cons "Hello", "World")->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
62 1 '<p>HelloWorld</p>';
63  
64 1 ▶TEST { P(cons I("Hello"), B(cons null, "World"))->string }
Subroutine __ANON__: called CC=1 SCAR=0.0
65 1 '<p><i>Hello</i><b>World</b></p>';
66  
67 1 ▶use Chj::Backtrace;
Subroutine BEGIN: called CC=1 SCAR=0.0
68  
69 1 ▶perhaps_run_tests(__PACKAGE__) or do {
Branch: 1 branch
BranchTrueFalseTotal
perhaps_run_tests(__PACKAGE__) or do { require FP::Repl; FP::Repl::repl() } 1 0 1
70 0 require FP::Repl;
71 0 FP::Repl::repl();
72 };
« lib/FP/Abstract/Compare.pm ↑ Summary lib/FP/Lazy/t.pm »