File: nonempty.t

package info (click to toggle)
libpod-eventual-perl 0.094001-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 176 kB
  • ctags: 14
  • sloc: perl: 172; makefile: 7
file content (36 lines) | stat: -rw-r--r-- 779 bytes parent folder | download | duplicates (5)
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
use strict;
use warnings;

use Test::More tests => 1;
use Pod::Eventual::Simple;

my $output = Pod::Eventual::Simple->read_file('eg/non-empty-blank.pod');
my @events = grep { $_->{type} ne 'nonpod' and $_->{type} ne 'blank' }
             @$output;

my $want = [
  {
    type    => 'command',
    command => 'pod',
    content => "\n",
    start_line => 1,
  },
  {
    type    => 'text',
    content => "The line after this contains whitespace only.\n",
    start_line => 3,
  },
  {
    type    => 'text',
    content => "...but that doesn't prevent this from being a new paragraph.\n",
    start_line => 5,
  },
  {
    type    => 'command',
    command => 'cut',
    content => "\n",
    start_line => 7,
  },
];

is_deeply(\@events, $want, 'we got the events we expected');