summaryrefslogtreecommitdiffstats
path: root/t/charset.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 11:26:17 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-17 11:26:17 +0000
commit5df6c2aefebe3d2abcc939a88e294876d59f03ca (patch)
tree63fb332a0f21ddb91cb789c80cf64e134d373463 /t/charset.t
parentInitial commit. (diff)
downloadpo4a-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/charset.t')
-rw-r--r--t/charset.t59
1 files changed, 59 insertions, 0 deletions
diff --git a/t/charset.t b/t/charset.t
new file mode 100644
index 0000000..e35a853
--- /dev/null
+++ b/t/charset.t
@@ -0,0 +1,59 @@
+#! /usr/bin/perl
+# Character sets tester.
+
+#########################
+
+use strict;
+use warnings;
+
+use lib q(t);
+use Testhelper;
+
+my @tests;
+
+push @tests,
+ {
+ 'doc' => 'master encoding: ascii',
+ 'po4a.conf' => 'charset/input-ascii/po4a.conf',
+ 'closed_path' => 'charset/*/',
+ 'options' => '--keep 0',
+ 'expected_files' => 'ascii.up.po ascii.pot ascii.up.pod ',
+ },
+ {
+ 'doc' => 'master encoding: iso8859',
+ 'po4a.conf' => 'charset/input-iso8859/po4a.conf',
+ 'closed_path' => 'charset/*/',
+ 'options' => '--keep 0',
+ 'expected_files' => 'iso8859.up.po iso8859.pot iso8859.up.pod ',
+ },
+ {
+ 'doc' => 'master encoding: UTF-8 ',
+ 'po4a.conf' => 'charset/input-utf8/po4a.conf',
+ 'closed_path' => 'charset/*/',
+ 'options' => '--keep 0',
+ 'expected_files' => 'utf8.up.po utf8.pot utf8.up.pod ',
+ },
+ {
+ 'format' => 'asciidoc',
+ 'input' => "charset/asciidoc/CharsetUtf.adoc",
+ },
+ {
+ 'doc' => "UTF with BOM marker (code point of width 3 at the beginning of the doc to indicate that it's UTF-8)",
+ 'format' => 'asciidoc',
+ 'input' => "charset/asciidoc/CharsetUtfBOM.adoc",
+ 'norm' => "charset/asciidoc/CharsetUtf.norm",
+ 'trans' => "charset/asciidoc/CharsetUtf.trans",
+ },
+ {
+ 'format' => 'asciidoc',
+ 'options' => '-M iso-8859-1',
+ 'input' => "charset/asciidoc/CharsetLatin1.adoc",
+ },
+ {
+ 'format' => 'yaml',
+ 'options' => "-M UTF-8",
+ 'input' => "charset/yaml/utf8.yaml",
+ };
+
+run_all_tests(@tests);
+0;