File Coverage

t/PerlySense-Editor-Emacs-output.t
Criterion Covered Total %
statement 34 34 100.0
branch n/a
condition n/a
subroutine 8 8 100.0
pod n/a
total 42 42 100.0


line stmt bran cond sub pod time code
1             #!/usr/bin/perl -w
2 1     1   117040 use strict;
  1         2  
  1         67  
3              
4 1     1   521 use Test::More tests => 7;
  1         14323  
  1         7  
5 1     1   612 use Test::Exception;
  1         2521  
  1         4  
6 1     1   560 use Test::Differences;
  1         10145  
  1         56  
7              
8 1     1   442 use Data::Dumper;
  1         5165  
  1         43  
9              
10              
11 1     1   285 use lib "lib";
  1         528  
  1         3  
12              
13 1     1   73424 use_ok("Devel::PerlySense");
  1         866  
  1         3  
  1         2  
  1         8  
14 1     1   309 use_ok("Devel::PerlySense::Editor::Emacs");
  1         806  
  1         2  
  1         2  
  1         9  
15              
16              
17              
18              
19 1         279 ok(my $oPerlySense = Devel::PerlySense->new(), "Created PerlySense object ok");
20 1         208 ok(
21             my $oEditor = Devel::PerlySense::Editor::Emacs->new(
22             oPerlySense => $oPerlySense,
23             widthDisplay => 10,
24             ),
25             "Created Editor ok",
26             );
27              
28              
29              
30 1         187 note("Elisp");
31              
32 1         47 is(
33             $oEditor->formatOutputDataStructure(
34             rhData => {
35             hej => "Baberiba",
36             2 => "two",
37             },
38             ),
39             qq{'(("2" . "two") ("hej" . "Baberiba"))},
40             "Simple structure ok",
41             );
42              
43 1         244 is(
44             $oEditor->formatOutputDataStructure(
45             rhData => {
46             hej => [ "Ba", "beriba" ],
47             2 => "two",
48             },
49             ),
50             qq{'(("2" . "two") ("hej" . ("Ba" "beriba")))},
51             "Array ref ok",
52             );
53              
54 1         196 is(
55             $oEditor->formatOutputDataStructure(
56             rhData => {
57             hej => { "Ba" => "beriba", Hej => "Baberiba" },
58             2 => "two",
59             },
60             ),
61             qq{'(("2" . "two") ("hej" . (("Ba" . "beriba") ("Hej" . "Baberiba"))))},
62             "Array ref ok",
63             );
64              
65              
66              
67              
68             __END__
69