Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test calling slop without calling pod_lines #1216

Merged
merged 1 commit into from
May 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions t/document/file.t
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,41 @@ END
);
};

subtest 'slop without pod_lines' => sub {
my $content = <<'END';
package Foo;
use strict;

=head1 NAME
X<Foo> X<Bar>

MyModule - mymodule1 abstract

not this

=pod

bla

=cut

more perl code

=head1 SYNOPSIS

more pod
more

even more

END

my $file = new_file_doc( content => \$content );

is( $file->slop, 11, 'slop is correct without first calling pod_lines' );
is_deeply( $file->pod_lines, [ [ 3, 12 ], [ 18, 6 ] ] );
};

subtest 'just pod' => sub {
my $content = <<'END';

Expand Down