• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test of comment extraction in the case of duplicated msgids.
5
6cat <<\EOF > xg-test7.c
7/* first comment */
8/* xgettext: c-format */
9gettext ("abc");
10
11/* first comment */
12/* xgettext: lisp-format */
13gettext ("abc");
14
15/* second comment */
16/* xgettext: python-format */
17gettext ("abc");
18EOF
19
20: ${XGETTEXT=xgettext}
21${XGETTEXT} --omit-header --add-comments -d xg-test7.tmp xg-test7.c || Exit 1
22LC_ALL=C tr -d '\r' < xg-test7.tmp.po > xg-test7.po || Exit 1
23
24cat <<\EOF > xg-test7.ok
25#. first comment
26#. second comment
27#: xg-test7.c:3 xg-test7.c:7 xg-test7.c:11
28#, c-format, python-format, lisp-format
29msgid "abc"
30msgstr ""
31EOF
32
33: ${DIFF=diff}
34${DIFF} xg-test7.ok xg-test7.po
35result=$?
36
37exit $result
38