3 # Test PHP support: --add-comments option.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-ph-3.php"
9 cat <<\EOF > xg-ph-3.php
12 /* b */ string = /* c */
14 /* e */ _( /* f */ "hello " /* g */ . /* h */ "world" /* i */ );
18 tmpfiles="$tmpfiles xg-ph-3.tmp.po xg-ph-3.po"
19 : ${XGETTEXT=xgettext}
20 ${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \
21 -d xg-ph-3.tmp xg-ph-3.php
22 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
23 LC_ALL=C tr -d '\r' < xg-ph-3.tmp.po > xg-ph-3.po
24 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
26 tmpfiles="$tmpfiles xg-ph-3.ok"
27 cat <<EOF > xg-ph-3.ok
39 ${DIFF} xg-ph-3.ok xg-ph-3.po