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/fmt-man.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/fmt-man.t')
-rw-r--r-- | t/fmt-man.t | 96 |
1 files changed, 96 insertions, 0 deletions
diff --git a/t/fmt-man.t b/t/fmt-man.t new file mode 100644 index 0000000..4e72834 --- /dev/null +++ b/t/fmt-man.t @@ -0,0 +1,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; |