2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test PHP support: here documents.
6 cat <<EOF > xg-ph-2.php
12 echo _("Babylonians");
42 : ${XGETTEXT=xgettext}
43 ${XGETTEXT} --omit-header --no-location -d xg-ph-2.tmp xg-ph-2.php || exit 1
44 LC_ALL=C tr -d '\r' < xg-ph-2.tmp.po > xg-ph-2.po || exit 1
46 sed 's!<<<EOTMARKER!<<<"EOTMARKER"!' xg-ph-2.php > xg-ph-2d.php || exit 1
47 sed "s!<<<EOTMARKER!<<<'EOTMARKER'!" xg-ph-2.php > xg-ph-2s.php || exit 1
49 : ${XGETTEXT=xgettext}
51 ${XGETTEXT} --omit-header --no-location -d xg-ph-2.tmp xg-ph-2.php || exit 1
52 LC_ALL=C tr -d '\r' < xg-ph-2.tmp.po > xg-ph-2.po || exit 1
54 ${XGETTEXT} --omit-header --no-location -d xg-ph-2d.tmp xg-ph-2d.php || exit 1
55 LC_ALL=C tr -d '\r' < xg-ph-2d.tmp.po > xg-ph-2d.po || exit 1
57 ${XGETTEXT} --omit-header --no-location -d xg-ph-2s.tmp xg-ph-2s.php || exit 1
58 LC_ALL=C tr -d '\r' < xg-ph-2s.tmp.po > xg-ph-2s.po || exit 1
60 cat <<EOF > xg-ph-2.ok
79 ${DIFF} xg-ph-2.ok xg-ph-2.po
81 test $result = 0 || exit $result
83 ${DIFF} xg-ph-2.ok xg-ph-2d.po
85 test $result = 0 || exit $result
87 ${DIFF} xg-ph-2.ok xg-ph-2s.po
89 test $result = 0 || exit $result