[Po4a-commits] r2601 - in /trunk/t: 30-text.t data-30/TitlesLatin1.asciidoc data-30/TitlesLatin1.po data-30/TitlesUTF8.asciidoc data-30/TitlesUTF8.po
barbier at users.alioth.debian.org
barbier at users.alioth.debian.org
Sun Sep 30 22:38:05 UTC 2012
Author: barbier
Date: Sun Sep 30 22:38:04 2012
New Revision: 2601
URL: http://svn.debian.org/wsvn/po4a/?sc=1&rev=2601
Log:
Add unit tests about encoding
Added:
trunk/t/data-30/TitlesLatin1.asciidoc
trunk/t/data-30/TitlesLatin1.po
trunk/t/data-30/TitlesUTF8.asciidoc
trunk/t/data-30/TitlesUTF8.po
Modified:
trunk/t/30-text.t
Modified: trunk/t/30-text.t
URL: http://svn.debian.org/wsvn/po4a/trunk/t/30-text.t?rev=2601&op=diff
==============================================================================
--- trunk/t/30-text.t (original)
+++ trunk/t/30-text.t Sun Sep 30 22:38:04 2012
@@ -27,8 +27,27 @@
};
}
-#use Test::More tests => 2 * scalar(@AsciiDocTests);
-use Test::More tests => 2 * 9;
+push @tests, {
+ 'run' => "perl ../../po4a-gettextize -f text -o asciidoc -m ../data-30/Titles.asciidoc -l ../data-30/TitlesUTF8.asciidoc -L UTF-8 -p TitlesUTF8.po",
+ 'test'=> "perl ../compare-po.pl ../data-30/TitlesUTF8.po TitlesUTF8.po",
+ 'doc' => "test titles with UTF-8 encoding"
+};
+push @tests, {
+ 'run' => "msgattrib --clear-fuzzy -o TitlesUTF8.po TitlesUTF8.po && perl ../../po4a-translate -f text -o asciidoc -m ../data-30/Titles.asciidoc -l TitlesUTF8.asciidoc -p TitlesUTF8.po",
+ 'test'=> "diff TitlesUTF8.asciidoc ../data-30/TitlesUTF8.asciidoc",
+ 'doc' => "translate titles with UTF-8 encoding"
+};
+push @tests, {
+ 'run' => "perl ../../po4a-gettextize -f text -o asciidoc -m ../data-30/Titles.asciidoc -l ../data-30/TitlesLatin1.asciidoc -L iso-8859-1 -p TitlesLatin1.po",
+ 'test'=> "perl ../compare-po.pl ../data-30/TitlesLatin1.po TitlesLatin1.po",
+ 'doc' => "test titles with latin1 encoding"
+};
+push @tests, {
+ 'run' => "msgattrib --clear-fuzzy -o TitlesLatin1.po TitlesLatin1.po && perl ../../po4a-translate -f text -o asciidoc -m ../data-30/Titles.asciidoc -l TitlesLatin1.asciidoc -p TitlesLatin1.po",
+ 'test'=> "diff TitlesLatin1.asciidoc ../data-30/TitlesLatin1.asciidoc",
+ 'doc' => "translate titles with latin1 encoding"
+};
+use Test::More tests => 2 * 13;
chdir "t/tmp" || die "Can't chdir to my test directory";
Added: trunk/t/data-30/TitlesLatin1.asciidoc
URL: http://svn.debian.org/wsvn/po4a/trunk/t/data-30/TitlesLatin1.asciidoc?rev=2601&op=file
==============================================================================
--- trunk/t/data-30/TitlesLatin1.asciidoc (added)
+++ trunk/t/data-30/TitlesLatin1.asciidoc Sun Sep 30 22:38:04 2012
@@ -1,0 +1,24 @@
+Où mettre un titre ?
+====================
+
+Titre 1
+-------
+
+Titre de niveau 2
+~~~~~~~~~~~~~~~~~
+
+Titre de niveau 3
+^^^^^^^^^^^^^^^^^
+
+Titre de niveau 4
++++++++++++++++++
+
+= Titre du document (niveau 0) =
+
+== Titre de section (niveau 1) ==
+
+=== Titre de section (niveau 2) ===
+
+==== Titre de section (niveau 3) ====
+
+===== Titre de section (niveau 4) =====
Added: trunk/t/data-30/TitlesLatin1.po
URL: http://svn.debian.org/wsvn/po4a/trunk/t/data-30/TitlesLatin1.po?rev=2601&op=file
==============================================================================
--- trunk/t/data-30/TitlesLatin1.po (added)
+++ trunk/t/data-30/TitlesLatin1.po Sun Sep 30 22:38:04 2012
@@ -1,0 +1,77 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-27 21:40+0300\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Title =
+#: ../data-30/Titles.asciidoc:2
+#, fuzzy, no-wrap
+msgid "Title0"
+msgstr "Où mettre un titre ?"
+
+#. type: Title -
+#: ../data-30/Titles.asciidoc:5
+#, fuzzy, no-wrap
+msgid "Title1"
+msgstr "Titre 1"
+
+#. type: Title ~
+#: ../data-30/Titles.asciidoc:8
+#, fuzzy, no-wrap
+msgid "Title level 2"
+msgstr "Titre de niveau 2"
+
+#. type: Title ^
+#: ../data-30/Titles.asciidoc:11
+#, fuzzy, no-wrap
+msgid "Title level 3"
+msgstr "Titre de niveau 3"
+
+#. type: Title +
+#: ../data-30/Titles.asciidoc:14
+#, fuzzy, no-wrap
+msgid "Title level 4"
+msgstr "Titre de niveau 4"
+
+#. type: Title =
+#: ../data-30/Titles.asciidoc:16
+#, fuzzy, no-wrap
+msgid "Document Title (level 0)"
+msgstr "Titre du document (niveau 0)"
+
+#. type: Title ==
+#: ../data-30/Titles.asciidoc:18
+#, fuzzy, no-wrap
+msgid "Section title (level 1)"
+msgstr "Titre de section (niveau 1)"
+
+#. type: Title ===
+#: ../data-30/Titles.asciidoc:20
+#, fuzzy, no-wrap
+msgid "Section title (level 2)"
+msgstr "Titre de section (niveau 2)"
+
+#. type: Title ====
+#: ../data-30/Titles.asciidoc:22
+#, fuzzy, no-wrap
+msgid "Section title (level 3)"
+msgstr "Titre de section (niveau 3)"
+
+#. type: Title =====
+#: ../data-30/Titles.asciidoc:24
+#, fuzzy, no-wrap
+msgid "Section title (level 4)"
+msgstr "Titre de section (niveau 4)"
Added: trunk/t/data-30/TitlesUTF8.asciidoc
URL: http://svn.debian.org/wsvn/po4a/trunk/t/data-30/TitlesUTF8.asciidoc?rev=2601&op=file
==============================================================================
--- trunk/t/data-30/TitlesUTF8.asciidoc (added)
+++ trunk/t/data-30/TitlesUTF8.asciidoc Sun Sep 30 22:38:04 2012
@@ -1,0 +1,24 @@
+Où mettre un titre ?
+====================
+
+Titre 1
+-------
+
+Titre de niveau 2
+~~~~~~~~~~~~~~~~~
+
+Titre de niveau 3
+^^^^^^^^^^^^^^^^^
+
+Titre de niveau 4
++++++++++++++++++
+
+= Titre du document (niveau 0) =
+
+== Titre de section (niveau 1) ==
+
+=== Titre de section (niveau 2) ===
+
+==== Titre de section (niveau 3) ====
+
+===== Titre de section (niveau 4) =====
Added: trunk/t/data-30/TitlesUTF8.po
URL: http://svn.debian.org/wsvn/po4a/trunk/t/data-30/TitlesUTF8.po?rev=2601&op=file
==============================================================================
--- trunk/t/data-30/TitlesUTF8.po (added)
+++ trunk/t/data-30/TitlesUTF8.po Sun Sep 30 22:38:04 2012
@@ -1,0 +1,77 @@
+# SOME DESCRIPTIVE TITLE
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2012-09-27 21:40+0300\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. type: Title =
+#: ../data-30/Titles.asciidoc:2
+#, fuzzy, no-wrap
+msgid "Title0"
+msgstr "Où mettre un titre ?"
+
+#. type: Title -
+#: ../data-30/Titles.asciidoc:5
+#, fuzzy, no-wrap
+msgid "Title1"
+msgstr "Titre 1"
+
+#. type: Title ~
+#: ../data-30/Titles.asciidoc:8
+#, fuzzy, no-wrap
+msgid "Title level 2"
+msgstr "Titre de niveau 2"
+
+#. type: Title ^
+#: ../data-30/Titles.asciidoc:11
+#, fuzzy, no-wrap
+msgid "Title level 3"
+msgstr "Titre de niveau 3"
+
+#. type: Title +
+#: ../data-30/Titles.asciidoc:14
+#, fuzzy, no-wrap
+msgid "Title level 4"
+msgstr "Titre de niveau 4"
+
+#. type: Title =
+#: ../data-30/Titles.asciidoc:16
+#, fuzzy, no-wrap
+msgid "Document Title (level 0)"
+msgstr "Titre du document (niveau 0)"
+
+#. type: Title ==
+#: ../data-30/Titles.asciidoc:18
+#, fuzzy, no-wrap
+msgid "Section title (level 1)"
+msgstr "Titre de section (niveau 1)"
+
+#. type: Title ===
+#: ../data-30/Titles.asciidoc:20
+#, fuzzy, no-wrap
+msgid "Section title (level 2)"
+msgstr "Titre de section (niveau 2)"
+
+#. type: Title ====
+#: ../data-30/Titles.asciidoc:22
+#, fuzzy, no-wrap
+msgid "Section title (level 3)"
+msgstr "Titre de section (niveau 3)"
+
+#. type: Title =====
+#: ../data-30/Titles.asciidoc:24
+#, fuzzy, no-wrap
+msgid "Section title (level 4)"
+msgstr "Titre de section (niveau 4)"
More information about the Po4a-commits
mailing list