1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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;
|