mirror of
https://https.git.savannah.gnu.org/git/gettext.git
synced 2026-01-29 10:54:42 +00:00
* gettext-tools/src/xg-encoding.c (non_ascii_error_message, non_utf8_error_message): Handle all possible lexical_context_ty values. * gettext-tools/tests/xgettext-javascript-8: New file. * gettext-tools/tests/Makefile.am (TESTS): Add it.
32 lines
879 B
Bash
Executable File
32 lines
879 B
Bash
Executable File
#! /bin/sh
|
|
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
|
|
|
|
# Test JavaScript support: non-ASCII characters in XML tags or content.
|
|
|
|
printf '<a\340' > xg-js-8a.js
|
|
printf '<a></a\340' > xg-js-8b.js
|
|
printf '<a>\340</a>' > xg-js-8c.js
|
|
|
|
: ${XGETTEXT=xgettext}
|
|
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location -d xg-js-8.tmp xg-js-8a.js 2>xg-js-8.err
|
|
result=$?
|
|
cat xg-js-8.err
|
|
test $result = 1 || Exit 1
|
|
grep 'Non-ASCII' xg-js-8.err >/dev/null || Exit 1
|
|
|
|
: ${XGETTEXT=xgettext}
|
|
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location -d xg-js-8.tmp xg-js-8b.js 2>xg-js-8.err
|
|
result=$?
|
|
cat xg-js-8.err
|
|
test $result = 1 || Exit 1
|
|
grep 'Non-ASCII' xg-js-8.err >/dev/null || Exit 1
|
|
|
|
: ${XGETTEXT=xgettext}
|
|
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location -d xg-js-8.tmp xg-js-8c.js 2>xg-js-8.err
|
|
result=$?
|
|
cat xg-js-8.err
|
|
test $result = 1 || Exit 1
|
|
grep 'Non-ASCII' xg-js-8.err >/dev/null || Exit 1
|
|
|
|
exit 0
|