File: get-stopwords.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 (23 lines) | stat: -rw-r--r-- 441 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
use strict;
use warnings;
use Test::More;
use Test::Deep;
use Pod::Wordlist;

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

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

cmp_deeply [ keys( %{ $p->wordlist } ) ],
	superbagof(qw(foo bar baz )),
	'stopwords added'
	;

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

cmp_deeply [ keys( %{ $p->wordlist } ) ], superbagof(qw( bar baz )),
	'stopwords still exist';

ok ! exists $p->wordlist->{foo}, 'foo was removed';

done_testing;