diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 11:26:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-17 11:26:17 +0000 |
commit | 5df6c2aefebe3d2abcc939a88e294876d59f03ca (patch) | |
tree | 63fb332a0f21ddb91cb789c80cf64e134d373463 /t/13-plural.t | |
parent | Initial commit. (diff) | |
download | po4a-5df6c2aefebe3d2abcc939a88e294876d59f03ca.tar.xz po4a-5df6c2aefebe3d2abcc939a88e294876d59f03ca.zip |
Adding upstream version 0.72.upstream/0.72
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/13-plural.t')
-rw-r--r-- | t/13-plural.t | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/t/13-plural.t b/t/13-plural.t new file mode 100644 index 0000000..9ecce29 --- /dev/null +++ b/t/13-plural.t @@ -0,0 +1,49 @@ +#! /usr/bin/perl +# MAN module tester. + +######################### + +use strict; +use warnings; + +use lib q(t); +use Testhelper; + +my @tests; + +my $diff_pod_flags = " -I 'This file was generated by po4a' "; + +push @tests, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod1 -p t-13-plural/pod1.po -l tmp/pod1.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/pod1.fr tmp/pod1.fr $diff_pod_flags"], + 'doc' => "Parse plural forms", + }, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod2 -p t-13-plural/pod1.po -l tmp/pod2.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/pod2.fr tmp/pod2.fr $diff_pod_flags"], + 'doc' => "Use singular form", + }, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod3 -p t-13-plural/pod1.po -l tmp/pod3.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/pod3.fr tmp/pod3.fr $diff_pod_flags"], + 'doc' => "Use plural form", + }, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod4 -p t-13-plural/pod1.po -l tmp/pod4.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/pod4.fr tmp/pod4.fr $diff_pod_flags"], + 'doc' => "Use single and plural form", + }, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod4 -p t-13-plural/pod1.po -l tmp/pod4.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/err1 tmp/err $diff_pod_flags"], + 'doc' => "Warn when using plural forms", + }, + { + 'run' => "PATH/po4a-translate -f pod -k 0 -m t-13-plural/pod4 -p t-13-plural/pod2.po -l tmp/pod4.fr 2> tmp/err", + 'tests' => ["diff -u t-13-plural/pod4.fr tmp/pod4.fr $diff_pod_flags"], + 'doc' => "Use single and plural form with multiple plural translations", + }; + +run_all_tests(@tests); +0; |