Debian Codegraph @

t/bugs.t

raw
1 use strict;
2 use warnings;
3 use Test::More;
4 use Test::NoWarnings ();
5 use Lingua::EN::Inflect::Phrase qw/to_S to_PL/;
6 use lib 't/lib';
7 use TestPhrase 'test_phrase';
8
9 # Some bugs I found while working on String::ToIdentifier::EN.
10
11 test_phrase '2 dots', '2 dots';
12 test_phrase '2 at signs', '2 at signs';
13 test_phrase '2 left braces', '2 left braces';
14
15 test_phrase '2 right braces', '2 right braces';
16
17 is to_PL('right brace'), 'right braces',
18 '"right brace" pluralizes to "right braces"';
19
20 test_phrase '2 single quotes', '2 single quotes';
21
22 # Here's one oliver found, "a" singularizes and pluralizes to "some"
23
24 test_phrase 'a', 'as';
25
26 # Some bugs people found while using Schema::Loader
27
28 test_phrase 'person', 'people';
29 test_phrase 'hero', 'heroes';
30 test_phrase 'referal log', 'referal logs'; # sic
31 test_phrase 'referral log', 'referral logs';
32 test_phrase 'alias', 'aliases';
33
34 # this one's from haarg
35
36 test_phrase 'status', 'statuses';
37
38 # this one's from jhanna
39
40 # $prefer_nouns defaults to 1
41 test_phrase 'source split', 'source splits', 'prefer_nouns=1';
42
43 {
44 local $Lingua::EN::Inflect::Phrase::prefer_nouns = 0;
45
46 test_phrase 'source splits', 'sources split', 'prefer_nouns=0';
47 }
48
49 Test::NoWarnings::had_no_warnings;
50
51 done_testing;
52
53 # vim:et sts=2 sw=2 tw=0: