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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
#! /usr/bin/perl
# Man module tester.
#########################
use strict;
use warnings;
use lib q(t);
use Testhelper;
my @tests;
push @tests,
{
'doc' => 'null arguments and null paragraphs',
'format' => 'man',
'input' => 'fmt/man/null.man',
},
{
'doc' => 'escaped newlines and tabs',
'format' => 'man',
'input' => 'fmt/man/escapes.man',
},
{
'doc' => 'User macros definition (missing behavior)',
'input' => 'fmt/man/macro-def.man',
'format' => 'man',
'norm_stderr' => 'fmt/man/macro-def.stderr-missing-behavior',
'trans_stderr' => 'fmt/man/macro-def.stderr-missing-behavior',
'options' => '--option groff_code=verbatim',
},
{
'doc' => 'User macros definition (untranslated)',
'input' => 'fmt/man/macro-def.man',
'format' => 'man',
'options' => '--option groff_code=verbatim -o untranslated=Blob',
},
{
'doc' => 'User macros definition (noarg)',
'input' => 'fmt/man/macro-def.man',
'format' => 'man',
'options' => ' --option groff_code=verbatim -o noarg=Blob',
},
{
'doc' => 'User macros definition and usage (missing behavior)',
'input' => 'fmt/man/macro-defuse.man',
'norm_stderr' => 'fmt/man/macro-defuse.stderr-missing-behavior',
'trans_stderr' => 'fmt/man/macro-defuse.stderr-missing-behavior',
'format' => 'man',
'options' => '--option groff_code=verbatim',
'error' => 1,
},
{
'doc' => 'User macros definition and usage (inline)',
'input' => 'fmt/man/macro-defuse.man',
'format' => 'man',
'options' => '--option groff_code=verbatim -o inline=Blob',
},
{
'doc' => 'User macros definition and usage (noarg)',
'input' => 'fmt/man/macro-defuse.man',
'format' => 'man',
'options' => ' --option groff_code=verbatim -o noarg=Blob',
'potfile' => 'fmt/man/macro-defuse.pot-noarg',
'pofile' => 'fmt/man/macro-defuse.po-noarg',
},
{
'doc' => 'hyphens (verbatim)',
'input' => 'fmt/man/hyphens-verbatim.man',
'format' => 'man',
'options' => '-o groff_code=verbatim',
},
{
'doc' => 'hyphens (translate)',
'input' => 'fmt/man/hyphens-translate.man',
'format' => 'man',
'options' => '-o groff_code=translate',
};
foreach my $t ( qw(fonts dots2 macros mdoc
quotes quoted-comment spaces
tbl-textblock tbl-option-tab tbl-mdoc-mixed1 tbl-mdoc-mixed2 tbl-mdoc-mixed3 tbl-mdoc-mixed4 ) ) {
push @tests, { 'format' => 'man', 'input' => "fmt/man/$t.man" };
}
foreach my $t (qw(dots-errors1 dots-errors2 dots-errors3)) {
push @tests, { 'format' => 'man', 'input' => "fmt/man/$t.man", 'error' => 1 };
}
run_all_tests(@tests);
0;
|