File: text-block.t

package info (click to toggle)
libpod-spell-perl 1.20-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 288 kB
  • ctags: 23
  • sloc: perl: 493; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 619 bytes parent folder | download | duplicates (2)
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
use strict;
use warnings;
use Test::More;
use Test::Deep;
use File::Temp;
use Pod::Spell;

my $podfile = File::Temp->new;
my $textfile = File::Temp->new;

print $podfile "\n=head1 TEST undef\n"
	. "\n=begin stopwords\n"
	. "\nPleumgh zpaph myormsp snickh\n\n"
	. "\nblah blargh bazh\n\n"
	. "\n=end stopwords\n"
	;

# reread from beginning
$podfile->seek( 0, 0 );

my $p = new_ok 'Pod::Spell' => [ debug => 1 ];

$p->parse_from_filehandle( $podfile, $textfile );

cmp_deeply [ keys( %{ $p->stopwords->wordlist } ) ],
	superbagof(qw(Pleumgh zpaph myormsp snickh blah blargh bazh )),
	'stopwords added'
	;

done_testing;