xgettext-rst-1 xgettext-rst-2 \
xgettext-python-1 xgettext-python-2 xgettext-python-3 \
xgettext-python-4 xgettext-python-5 xgettext-python-6 \
- xgettext-python-7 xgettext-python-8 \
+ xgettext-python-7 xgettext-python-8 xgettext-python-9 \
xgettext-python-stackovfl-1 xgettext-python-stackovfl-2 \
xgettext-python-stackovfl-3 xgettext-python-stackovfl-4 \
xgettext-ruby-1 xgettext-ruby-2 \
--- /dev/null
+#!/bin/sh
+. "${srcdir=.}/init.sh"; path_prepend_ . ../src
+
+# Test Python support:
+# warning "format string with unnamed arguments cannot be properly localized"
+
+cat <<\EOF > xg-py-9-1.py
+gettext ("foo %s bar") % ('a');
+EOF
+
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -d xg-py-9-1 xg-py-9-1.py 2>xg-py-9-1.err || Exit 1
+# Expect no warning here (because the format string has only one placeholder).
+if test -s xg-py-9-1.err; then
+ Exit 1
+fi
+
+cat <<\EOF > xg-py-9-2.py
+gettext ("foo %s and %s bar") % ('a', 'b');
+EOF
+
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -d xg-py-9-2 xg-py-9-2.py 2>xg-py-9-2.err || Exit 1
+# Expect a warning here (because the format string has two placeholders).
+test -s xg-py-9-2.err || Exit 1