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-docbook.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 '')
-rw-r--r-- | t/fmt-docbook.t | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/fmt-docbook.t b/t/fmt-docbook.t new file mode 100644 index 0000000..20f0962 --- /dev/null +++ b/t/fmt-docbook.t @@ -0,0 +1,39 @@ +# XML and XML-based modules tester. + +######################### + +use strict; +use warnings; + +use lib q(t); +use Testhelper; + +my @tests; + +push @tests, + { + 'format' => 'docbook', + 'input' => 'fmt/docbook/debian-history.dbk', + 'doc' => 'Reduced structure of the debian-history document, with the options used in the real package', + 'options' => "-M UTF-8 -o nodefault='<bookinfo>' -o break='<bookinfo>' -o untranslated='<bookinfo>'", + }, + { # This is the buggy pre-0.58 behavior where the flow is broken by processing instructions + # This triggers an unfortunate behavior as the break occurs on the path <screen><userinput> where <screen> is nowrap and <userinput> is inline|wrap. + # As a result, when the PI breaks within <userinput>, the first part is translated with wrap. + # When the second part (after the PI) is pushed, we are back in <screen> path, so this part is translated with no-wrap (as it should) + # The default behavior was changed to ensure that PI are not breaking, but this option is still provided just in case somebody needs PI to be breaking + 'doc' => 'GH#170: processing instructions should not be breaking', + 'format' => 'docbook', + 'options' => '-o break-pi', + 'input' => "fmt/docbook/PI-break.dbk", + }, + { # This is ensuring that GH#170 is gone + # Since the PI is handled as inline, the input (that is the same as previously) now builds only one msgid, produced in <screen> path. + # The <userinput> is inline as expected, and so is the PI. + 'doc' => 'GH#170: processing instructions should be inline tags', + 'format' => 'docbook', + 'input' => "fmt/docbook/PI-inline.dbk", + }; + +run_all_tests(@tests); +0; |