~ubuntu-branches/ubuntu/wily/libintl-perl/wily-proposed

« back to all changes in this revision

Viewing changes to tests/03dngettext_xs.t

  • Committer: Bazaar Package Importer
  • Author(s): Peter Eisentraut
  • Date: 2005-11-18 09:41:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20051118094142-3gdzz3ljdxav8aha
Tags: 1.16-1
* New upstream release
* Added FAQ and THANKS to installation

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
Locale::Messages::nl_putenv ("LC_ALL=de_AT");
71
71
Locale::Messages::nl_putenv ("LANG=de_AT");
72
72
Locale::Messages::nl_putenv ("LC_MESSAGES=de_AT");
73
 
 
74
 
POSIX::setlocale (POSIX::LC_ALL() => '');
 
73
my $missing_locale = POSIX::setlocale (POSIX::LC_ALL() => '') ?
 
74
    '' : 'locale de_AT missing';
75
75
 
76
76
for (0 .. 9) {
77
77
        my $translation = dngettext (existing => $strings[0], $strings[1], $_);
78
 
        ok $_ == 1 ? 'Einzahl' eq $translation : 'Mehrzahl' eq $translation;
 
78
        skip $missing_locale,
 
79
                $_ == 1 ? 'Einzahl' eq $translation : 'Mehrzahl' eq $translation;
79
80
}
80
81
 
81
82
Locale::Messages::nl_putenv ("LANGUAGE=C");
107
108
        my $plural = ($_ == 1 ? 0 : 
108
109
                                  $_ % 10 == 2 ? 1 : 
109
110
                                  $_ % 10 == 3 || $_ %10 == 4 ? 2 : 3);
110
 
        ok "Numerus $plural" eq $translation;
 
111
        skip $missing_locale, "Numerus $plural" eq $translation;
111
112
}
112
113
 
113
114
__END__