blob: 6c8a8e0440810537f9de423ee8f030fd23516b8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test PHP support: strings with hexadecimal escape sequences that are
# invalid UTF-8.
cat <<\EOF > xg-ph-3.php
<?
_("\xE0")
?>
EOF
: ${XGETTEXT=xgettext}
LANGUAGE= LC_ALL=C ${XGETTEXT} --no-location --from-code=UTF-8 -d xg-ph-3.tmp xg-ph-3.php 2>xg-ph-3.err
result=$?
cat xg-ph-3.err
test $result = 1 || Exit 1
grep 'is not UTF-8 encoded' xg-ph-3.err >/dev/null || Exit 1
exit 0
|