File: data-blanks.t

package info (click to toggle)
libpod-elemental-perl 0.103006-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 396 kB
  • sloc: perl: 1,471; makefile: 7
file content (39 lines) | stat: -rw-r--r-- 493 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
37
38
39
#!/usr/bin/env perl
use strict;
use warnings;
use Pod::Elemental;
use Pod::Elemental::Transformer::Pod5;

use Test::More;

my $string = <<'END_POD';

=begin foo

=over 4

=item * foo

bar

=item * bar

baz

=back

=end foo

END_POD

my $document = Pod::Elemental->read_string($string);

Pod::Elemental::Transformer::Pod5->new->transform_node($document);

like(
  $document->as_pod_string,
  qr{^=item \* bar\n\nbaz\n\n=back}m,
  "we do not drop newlines in data paragraphs",
);

done_testing;