summaryrefslogtreecommitdiffstats
path: root/t/core-porefs.t
blob: 32d375a54b0ba84e31044ffe6a91dcb456ef8b83 (plain)
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
50
51
52
53
54
55
56
57
58
59
60
61
#! /usr/bin/perl
# Addenda modifiers tester.

#########################

use strict;
use warnings;

use lib q(t);
use Testhelper;

my @tests;

push @tests, {
    'doc'            => 'Many PO references',
    'po4a.conf'      => 'core/porefs/po4a.conf',
    'options'        => '--no-translations',
    'modes'          => 'dstdir',
    'expected_files' => 'list.pot up.po',
    'tests'          => [
        'PODIFF core/porefs/_base.pot tmp/core/porefs/list.pot',    # force tidyall to wrap here
        'PODIFF core/porefs/_base.po  tmp/core/porefs/up.po',
    ]
  },
  {
    'doc'            => 'Many PO references --porefs=none',
    'po4a.conf'      => 'core/porefs/po4a.conf',
    'options'        => '--no-translations --porefs=none',
    'modes'          => 'dstdir',
    'expected_files' => 'list.pot up.po',
    'tests'          => [
        'PODIFF core/porefs/_none.pot tmp/core/porefs/list.pot',    #
        'PODIFF core/porefs/_none.po  tmp/core/porefs/up.po',
    ]
  },
  {
    'doc'            => 'Many PO references --porefs=file',
    'po4a.conf'      => 'core/porefs/po4a.conf',
    'options'        => '--no-translations --porefs=file',
    'modes'          => 'dstdir',
    'expected_files' => 'list.pot up.po',
    'tests'          => [
        'PODIFF core/porefs/_file.pot tmp/core/porefs/list.pot',    #
        'PODIFF core/porefs/_file.po  tmp/core/porefs/up.po',
    ]
  },
  {
    'doc'            => 'Many PO references --porefs=counter',
    'po4a.conf'      => 'core/porefs/po4a.conf',
    'options'        => '--no-translations --porefs=counter',
    'modes'          => 'dstdir',
    'expected_files' => 'list.pot up.po',
    'tests'          => [
        'PODIFF core/porefs/_counter.pot tmp/core/porefs/list.pot',
        'PODIFF core/porefs/_counter.po  tmp/core/porefs/up.po',
    ]

  };

run_all_tests(@tests);
0;