diff options
Diffstat (limited to 'gettext-tools/tests')
-rw-r--r-- | gettext-tools/tests/Makefile.am | 2 | ||||
-rwxr-xr-x | gettext-tools/tests/xgettext-python-6 | 23 |
2 files changed, 24 insertions, 1 deletions
diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index b0d96c83e..cfbc7179c 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -139,7 +139,7 @@ TESTS = gettext-1 gettext-2 \ xgettext-properties-4 \ xgettext-rst-1 xgettext-rst-2 \ xgettext-python-1 xgettext-python-2 xgettext-python-3 \ - xgettext-python-4 xgettext-python-5 \ + xgettext-python-4 xgettext-python-5 xgettext-python-6 \ xgettext-python-stackovfl-1 xgettext-python-stackovfl-2 \ xgettext-python-stackovfl-3 xgettext-python-stackovfl-4 \ xgettext-ruby-1 \ diff --git a/gettext-tools/tests/xgettext-python-6 b/gettext-tools/tests/xgettext-python-6 new file mode 100755 index 000000000..72657a0bb --- /dev/null +++ b/gettext-tools/tests/xgettext-python-6 @@ -0,0 +1,23 @@ +#!/bin/sh +. "${srcdir=.}/init.sh"; path_prepend_ . ../src + +# Test Python support: a python-brace-format string with a NUL byte. + +tr X '\0' <<\EOF > xg-py-6.py +_("{0:X>}") +EOF + +: ${XGETTEXT=xgettext} +${XGETTEXT} --omit-header --no-location -d xg-py-6.tmp xg-py-6.py || Exit 1 +LC_ALL=C tr -d '\r' < xg-py-6.tmp.po > xg-py-6.po || Exit 1 + +cat <<EOF > xg-py-6.ok +msgid "{0:" +msgstr "" +EOF + +: ${DIFF=diff} +${DIFF} xg-py-6.ok xg-py-6.po +result=$? + +exit $result |