24 Commits

Author SHA1 Message Date
Bruno Haible
f405ab69d9 tests: Strengthen tests.
* gettext-tools/tests/lang-bash: Invoke msgfmt with option '-c'.
* gettext-tools/tests/lang-c: Likewise.
* gettext-tools/tests/lang-c++: Likewise.
* gettext-tools/tests/lang-c++20: Likewise.
* gettext-tools/tests/lang-c++26: Likewise.
* gettext-tools/tests/lang-c++-boost: Likewise.
* gettext-tools/tests/lang-clisp: Likewise.
* gettext-tools/tests/lang-csharp: Likewise.
* gettext-tools/tests/lang-d: Likewise.
* gettext-tools/tests/lang-elisp: Likewise.
* gettext-tools/tests/lang-gawk: Likewise.
* gettext-tools/tests/lang-go: Likewise.
* gettext-tools/tests/lang-guile: Likewise.
* gettext-tools/tests/lang-java: Likewise.
* gettext-tools/tests/lang-javascript: Likewise.
* gettext-tools/tests/lang-librep: Likewise.
* gettext-tools/tests/lang-lua: Likewise.
* gettext-tools/tests/lang-modula2: Likewise.
* gettext-tools/tests/lang-objc: Likewise.
* gettext-tools/tests/lang-pascal: Likewise.
* gettext-tools/tests/lang-perl-1: Likewise.
* gettext-tools/tests/lang-perl-2: Likewise.
* gettext-tools/tests/lang-php: Likewise.
* gettext-tools/tests/lang-python-1: Likewise.
* gettext-tools/tests/lang-python-2: Likewise.
* gettext-tools/tests/lang-ruby: Likewise.
* gettext-tools/tests/lang-rust: Likewise.
* gettext-tools/tests/lang-sh-1: Likewise.
* gettext-tools/tests/lang-sh-2: Likewise.
* gettext-tools/tests/lang-sh-3: Likewise.
* gettext-tools/tests/lang-smalltalk: Likewise.
* gettext-tools/tests/lang-tcl: Likewise.
* gettext-tools/tests/lang-vala: Likewise.
2025-07-03 17:41:15 +02:00
Bruno Haible
b013095ee1 Python: Add another unit test.
* gettext-tools/tests/lang-python-2: New file, based on
gettext-tools/tests/lang-python-1.
* gettext-tools/tests/Makefile.am (TESTS): Add it.
2025-06-24 11:34:38 +02:00
Bruno Haible
78e9a5d2d9 Python: Remove an obsolete unit test.
Python versions < 2.3 are irrelevant nowadays.

* gettext-tools/tests/lang-python-1: Renamed from
gettext-tools/tests/lang-python-2.
* gettext-tools/tests/Makefile.am (TESTS): Remove lang-python-2.
2025-06-24 11:34:38 +02:00
Bruno Haible
ec07a48b8f Reject the dysfunctional gettext in Solaris libc, other than Solaris 11.4.
This fixes a 'make installcheck' failure.

<https://www.illumos.org/issues/13423> has been reported more than 4 years ago.
I don't have hope that they will fix it, ever.

* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): On Solaris other than
Solaris 11.4, don't use the gettext() function in libc.
* gettext-tools/tests/init.cfg (prepare_locale_): Remove function.
* gettext-tools/tests/format-c-3: Remove prepare_locale_ invocations.
* gettext-tools/tests/format-c-4: Likewise.
* gettext-tools/tests/format-c-5: Likewise.
* gettext-tools/tests/intl-0: Likewise.
* gettext-tools/tests/intl-1: Likewise.
* gettext-tools/tests/intl-2: Likewise.
* gettext-tools/tests/intl-3: Likewise.
* gettext-tools/tests/intl-4: Likewise.
* gettext-tools/tests/intl-6: Likewise.
* gettext-tools/tests/intl-7: Likewise.
* gettext-tools/tests/intl-thread-1: Likewise.
* gettext-tools/tests/intl-thread-2: Likewise.
* gettext-tools/tests/intl-thread-3: Likewise.
* gettext-tools/tests/lang-bash: Likewise.
* gettext-tools/tests/lang-c: Likewise.
* gettext-tools/tests/lang-c++: Likewise.
* gettext-tools/tests/lang-c++20: Likewise.
* gettext-tools/tests/lang-c++26: Likewise.
* gettext-tools/tests/lang-clisp: Likewise.
* gettext-tools/tests/lang-csharp: Likewise.
* gettext-tools/tests/lang-d: Likewise.
* gettext-tools/tests/lang-gawk: Likewise.
* gettext-tools/tests/lang-go: Likewise.
* gettext-tools/tests/lang-guile: Likewise.
* gettext-tools/tests/lang-java: Likewise.
* gettext-tools/tests/lang-javascript: Likewise.
* gettext-tools/tests/lang-librep: Likewise.
* gettext-tools/tests/lang-lua: Likewise.
* gettext-tools/tests/lang-modula2: Likewise.
* gettext-tools/tests/lang-objc: Likewise.
* gettext-tools/tests/lang-pascal: Likewise.
* gettext-tools/tests/lang-perl-1: Likewise.
* gettext-tools/tests/lang-perl-2: Likewise.
* gettext-tools/tests/lang-php: Likewise.
* gettext-tools/tests/lang-python-1: Likewise.
* gettext-tools/tests/lang-python-2: Likewise.
* gettext-tools/tests/lang-ruby: Likewise.
* gettext-tools/tests/lang-rust: Likewise.
* gettext-tools/tests/lang-sh: Likewise.
* gettext-tools/tests/lang-smalltalk: Likewise.
* gettext-tools/tests/lang-tcl: Likewise.
* gettext-tools/tests/lang-vala: Likewise.
* gettext-tools/tests/msgfmt-20: Likewise.
* gettext-tools/tests/plural-1: Likewise.
* NEWS: Mention the change.
2025-06-19 22:35:17 +02:00
Bruno Haible
63304506cc lang-python-*: Fix test failures on mingw with UCRT.
* gettext-tools/tests/lang-python-1: Disable ISO8859_LOCALE_UNSUPPORTED for
Python 3. Set PYTHONIOENCODING environment variable.
* gettext-tools/tests/lang-python-2: Likewise.
2024-12-24 16:48:55 +01:00
Bruno Haible
d1d131a036 tests: Prefer 'cat <<\EOF' to 'cat <<EOF' whenever possible.
Rationale: Not interpreting $ and \ in the here documents is a better default
than interpreting them.

* gettext-tools/tests/*: Write 'cat <<\EOF' instead of 'cat <<EOF', when no
shell dollar-substitution and backslash-interpretation is needed.
2024-08-16 10:36:58 +02:00
Bruno Haible
bfe6abb200 lang-python-*: Avoid SKIP on macOS.
* gettext-tools/tests/lang-python-1: Search for 'python3' and 'python'.
* gettext-tools/tests/lang-python-2: Likewise.
2024-07-16 14:59:00 +02:00
Bruno Haible
3c7e67be7d Fix lang-python-* failures when a traditional French locale is present.
This is caused by the new UTF-8 encoded messages in .mo files, together
with a bug in gettext.py from Python 2.7 that prohibits reencoding of the
looked-up messages at run time.

* gettext-tools/tests/lang-python-1: Instead of conditionally skipping the test
in the $LOCALE_FR_UTF8 locale, conditionally skip the test in the $LOCALE_FR
locale.
* gettext-tools/tests/lang-python-2: Likewise.
2023-06-19 18:33:36 +02:00
Bruno Haible
d7fb221d29 Fix lang-python-* test failures with Python 3.8.
* gettext-tools/tests/lang-python-1: Use syntax that works also with Python 3.
* gettext-tools/tests/lang-python-2: Likewise.
2022-01-02 15:39:59 +01:00
Bruno Haible
1fc899c609 Tests: Update comments.
* gettext-tools/tests/lang-python-1: Update comment about Python versions.
* gettext-tools/tests/lang-python-2: Likewise.
* gettext-tools/tests/lang-pascal: Update comment about fpk versions.
2018-10-21 20:30:30 +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
7ebb32f1b9 tests: Adjust textdomain directory for Solaris 11
Solaris 11 doesn't strip the CODESET part from the locale name,
when looking for a message catalog.  Create a directory link with
CODESET, to work around this.
2014-10-01 14:40:42 +09:00
Daiki Ueno
e860dc2849 tests: Stop redundant textdomain directory creation
This was introduced by commit 3533f6cc when we didn't use separate
test directory for each test.  Now that we switched to init.sh, we
don't need to worry about filename conflicts.
2014-10-01 14:35:51 +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
Daiki Ueno
3533f6cc35 Use distinct temporary file names in tests. 2013-05-30 13:07:31 +09:00
Bruno Haible
cec3abadd6 Avoid testsuite failures on MacOS X 10.5. 2009-06-23 12:15:38 +02:00
Bruno Haible
ea6f5e58fc Convert CR/LF to LF. 2009-06-23 12:14:48 +02:00
Bruno Haible
13655b1609 Provide better SKIP explanations. 2009-06-23 12:13:22 +02:00
Bruno Haible
b83b91e1ee Explain why tests are skipped. 2009-06-23 12:13:22 +02:00
Bruno Haible
5757f7f4d8 Perform the lang-* tests both in a traditional locale and in a UTF-8 locale,
as far as provided by the system.
2009-06-23 12:12:16 +02:00
Bruno Haible
af9229b55c Use the system's french locale, even if it's called "fr_FR.ISO8859-1" instead
of just plain "fr_FR".
2009-06-23 12:10:42 +02:00
Bruno Haible
c3bfe25c25 Support for plural forms in xgettext --language=Python. 2009-06-23 12:10:14 +02:00