13 Commits

Author SHA1 Message Date
Bruno Haible
d3ea8dce31 Fix test failures on Haiku.
* gettext-tools/tests/init.cfg (func_filter_POT_Creation_Date): New function.
* gettext-tools/tests/xgettext-*: Use it.
2019-12-24 17:37:07 +01:00
Bruno Haible
c65180d223 xgettext: Assume that Python source files are in UTF-8 by default.
Reported by ilias iliadis <apiuano-bugs@yahoo.gr>
at <https://savannah.gnu.org/bugs/?55231>.

* gettext-tools/src/xg-encoding.h (xgettext_global_source_encoding): Allow a
NULL value.
* gettext-tools/src/xg-encoding.c (xgettext_global_source_encoding): Likewise.
* gettext-tools/src/xgettext.c (main): Initialize
xgettext_global_source_encoding with NULL, not "ASCII". Handle a NULL
xgettext_global_source_encoding.
(extract_from_file): Use ASCII as default for xgettext_global_source_encoding.
* gettext-tools/src/x-javascript.c (extract_javascript): Likewise.
* gettext-tools/src/x-python.c (phase2_getc): Signal an error when encountering
an invalid or incomplete UTF-8 character.
(set_current_file_source_encoding): In the error message, use
xgettext_current_file_source_encoding instead of
xgettext_global_source_encoding.
(extract_python): Use UTF-8 as default for xgettext_global_source_encoding.
* gettext-tools/tests/xgettext-python-3: Verify that if the source file has no
magic coding comment but is UTF-8 encoded, xgettext succeeds.
* NEWS: Mention the change.
2019-08-25 23:37:44 +02:00
Bruno Haible
c0a7aa5d9b Add comments about tests that fail on Alpine Linux.
Reported by Nelson H. F. Beebe.

* gettext-tools/tests/msgconv-2: Add comment about musl libc.
* gettext-tools/tests/msgmerge-compendium-6: Likewise.
* gettext-tools/tests/xgettext-python-3: Likewise.
2019-04-28 11:15:47 +02:00
Daiki Ueno
59d9b55bb2 tests: Use Exit instead of exit if init.sh is used
* gettext-tools/tests/*: Use Exit instead of exit, as suggested by
init.sh.
2016-06-08 15:28:49 +09:00
Daiki Ueno
ec84e32c72 tests: Undo the previous unintended file mode changes 2014-03-10 21:10:01 +09:00
Daiki Ueno
d66197a3ca tests: Remove unnecessary tempfile cleanup code
Cleanup code like "rm -fr $tmpfiles" are no longer needed, since
'init.sh' takes care of that.
2014-03-10 18:24:15 +09:00
Daiki Ueno
6c0abd26de gettext-tools: convert tests to use init.sh from Gnulib 2013-07-10 18:34:09 +09:00
Bruno Haible
cec3abadd6 Avoid testsuite failures on MacOS X 10.5. 2009-06-23 12:15:38 +02:00
Bruno Haible
3ab41f2649 Avoid test failures due to broken 'grep' program on OpenBSD 4.0. 2009-06-23 12:15:36 +02:00
Bruno Haible
2ae1594f76 Introduce a new header entry field 'Language'. 2009-06-23 12:15:35 +02:00
Bruno Haible
426db48d46 Avoid test suite failures on Cygwin-hosted mingw. 2009-06-23 12:15:19 +02:00
Bruno Haible
ac5efe36bd When the tests work in a pure POSIX environment. 2009-06-23 12:12:56 +02:00
Bruno Haible
728072fe21 Test encoding recognition of Python extractor. 2009-06-23 12:12:51 +02:00