• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test of extracted comments specified per keyword, including the case of
5# duplicated msgids.
6
7cat <<\EOF > xg-test9.c
8/* xgettext: max-width 25 */
9label ("eagle");
10
11/* xgettext: xml-format */
12label ("seamew");
13
14title ("falcon");
15
16label ("falcon");
17
18label ("pigeon");
19label ("pigeon");
20EOF
21
22: ${XGETTEXT=xgettext}
23${XGETTEXT} --omit-header \
24  --keyword=label:1,\"xhtml-format\",\"xml-format\" \
25  --keyword=title:1,\"xhtml-format\",\"xml-format\" \
26  -d xg-test9.tmp xg-test9.c || Exit 1
27LC_ALL=C tr -d '\r' < xg-test9.tmp.po > xg-test9.po || Exit 1
28
29cat <<\EOF > xg-test9.ok
30#. xhtml-format
31#. xml-format
32#: xg-test9.c:2
33msgid "eagle"
34msgstr ""
35
36#. xhtml-format
37#. xml-format
38#: xg-test9.c:5
39msgid "seamew"
40msgstr ""
41
42#. xhtml-format
43#. xml-format
44#: xg-test9.c:7 xg-test9.c:9
45msgid "falcon"
46msgstr ""
47
48#. xhtml-format
49#. xml-format
50#: xg-test9.c:11 xg-test9.c:12
51msgid "pigeon"
52msgstr ""
53EOF
54
55: ${DIFF=diff}
56${DIFF} xg-test9.ok xg-test9.po
57result=$?
58
59exit $result
60