File: get-stopwords.t

package info (click to toggle)
libpod-spell-perl 1.27-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 292 kB
  • sloc: perl: 431; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 524 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
use strict;
use warnings;
use Test::More;
use Pod::Wordlist;

my $p = new_ok 'Pod::Wordlist';

$p->learn_stopwords( 'foo bar baz' );

ok exists $p->wordlist->{foo}, 'stopword added: foo';
ok exists $p->wordlist->{bar}, 'stopword added: bar';
ok exists $p->wordlist->{baz}, 'stopword added: baz';

$p->learn_stopwords( '!foo' );

ok ! exists $p->wordlist->{foo}, 'stopword removed: foo';
ok exists $p->wordlist->{bar}, 'stopword still exists: bar';
ok exists $p->wordlist->{baz}, 'stopword still exists: baz';

done_testing;