This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Use values if known at compile time
[perl5.git] / dist / I18N-LangTags / t / 07_listy.t
CommitLineData
f6eec1c3 1use strict;
6aaed204
NC
2use Test::More tests => 16;
3BEGIN {use_ok('I18N::LangTags::List');}
f6eec1c3 4
6aaed204 5note("Perl v$], I18N::LangTags::List v$I18N::LangTags::List::VERSION");
f6eec1c3 6
6aaed204
NC
7is(I18N::LangTags::List::name('fr'), 'French');
8isnt(I18N::LangTags::List::name('fr-fr'), undef);
9is(I18N::LangTags::List::name('El Zorcho'), undef);
10is(I18N::LangTags::List::name(), undef);
f6eec1c3 11
6aaed204
NC
12isnt(I18N::LangTags::List::is_decent(), undef);
13foreach(['fr', 2],
14 ['fr-blorch', 2],
15 ['El Zorcho', 0],
16 ['sgn', 0],
17 ['sgn-us', 2],
18 ['i', 0],
19 ['i-mingo', 2],
20 ['i-mingo-tom', 2],
21 ['cel', 0],
22 ['cel-gaulish', 2],
23 ) {
24 my ($tag, $expect) = @$_;
25 is(I18N::LangTags::List::is_decent($tag), $expect,
26 "I18N::LangTags::List::is_decent('$tag')");
27}