diff options
author | Claude Paroz <claude@2xlibre.net> | 2011-06-01 15:11:51 +0200 |
---|---|---|
committer | Claude Paroz <claude@2xlibre.net> | 2011-06-01 15:11:51 +0200 |
commit | 1ebcc2af7fa4d6e12687199e173720b44eb823a3 (patch) | |
tree | 91fbc293c2a3d9f99d064a8d2233a62cf1a9357e | |
parent | 480a2531c9b8ba0249f9326e8d043de309486e5b (diff) | |
download | itstool-1ebcc2af7fa4d6e12687199e173720b44eb823a3.tar.gz |
Fix LocNote2 test and add README in tests
-rw-r--r-- | tests/LocNote2.pot | 25 | ||||
-rw-r--r-- | tests/README | 5 | ||||
-rw-r--r-- | tests/run_tests.py | 4 |
3 files changed, 32 insertions, 2 deletions
diff --git a/tests/LocNote2.pot b/tests/LocNote2.pot new file mode 100644 index 0000000..46d04a0 --- /dev/null +++ b/tests/LocNote2.pot @@ -0,0 +1,25 @@ +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 2011-06-01 15:08+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: tests/LocNote2.xml:11(body/msg) +msgid "This is a hippoptamus: <_:img-1/>." +msgstr "" + +#: tests/LocNote2.xml:12(body/msg) +msgid "This is an elephant: <_:img-1/>." +msgstr "" + +#. The variable {0} has three possible values: 'printer', 'stacker' and +#. 'stapler options'. +#: tests/LocNote2.xml:13(body/msg) +msgid "The {0} has been disabled." +msgstr "" + diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..0556dfe --- /dev/null +++ b/tests/README @@ -0,0 +1,5 @@ +To run the test suite, place yourself in the itstool root directory and run: + $ python tests/run_tests.py + +Test files are coming from: + http://www.w3.org/International/its/tests/ diff --git a/tests/run_tests.py b/tests/run_tests.py index 78d6e6a..fafc1cb 100644 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -40,7 +40,7 @@ class ItstoolTests(unittest.TestCase): # If a reference pot file is present, test the output with this file if reference_pot is None: reference_pot = start_file_base + ".pot" - if os.path.exists(reference_pot): + if os.path.exists(os.path.join(TEST_DIR, reference_pot)): self.assertFilesEqual(os.path.join(TEST_DIR, "test.pot"), os.path.join(TEST_DIR, reference_pot)) def _test_translation_process(self, start_file): @@ -64,7 +64,7 @@ class ItstoolTests(unittest.TestCase): def test_locnotes_external(self): # FIXME: only the third note appears currently, as attribute extraction is not yet implemented - self._test_pot_generation('LocNote2.xml', reference_pot='LocNote1.pot') + self._test_pot_generation('LocNote2.xml') def test_locnotes_ontags(self): self._test_pot_generation('LocNote3.xml') |