• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test PHP support: --add-comments option.
5
6cat <<\EOF > xg-ph-3.php
7<?
8/* a */
9/* b */ string = /* c */
10/* d */
11/* e */ _( /* f */ "hello " /* g */ . /* h */ "world" /* i */ );
12?>
13EOF
14
15: ${XGETTEXT=xgettext}
16${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \
17  -d xg-ph-3.tmp xg-ph-3.php || Exit 1
18LC_ALL=C tr -d '\r' < xg-ph-3.tmp.po > xg-ph-3.po || Exit 1
19
20cat <<EOF > xg-ph-3.ok
21#. a
22#. b
23#. c
24#. d
25#. e
26#. f
27msgid "hello world"
28msgstr ""
29EOF
30
31: ${DIFF=diff}
32${DIFF} xg-ph-3.ok xg-ph-3.po
33result=$?
34
35exit $result
36