• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test C support: recognition of #line.
5
6cat <<EOF > xg-c-3.in.c
7#line 42 "bozo"
8main(){printf(gettext("Hello, World!\n"));}
9# 6 "clown"
10gettext("nothing");
11EOF
12
13: ${XGETTEXT=xgettext}
14${XGETTEXT} --omit-header --add-location -d xg-c-3.tmp xg-c-3.in.c || Exit 1
15LC_ALL=C tr -d '\r' < xg-c-3.tmp.po > xg-c-3.po || Exit 1
16
17cat <<EOF > xg-c-3.ok
18#: bozo:42
19#, c-format
20msgid "Hello, World!\n"
21msgstr ""
22
23#: clown:6
24msgid "nothing"
25msgstr ""
26EOF
27
28: ${DIFF=diff}
29${DIFF} xg-c-3.ok xg-c-3.po
30result=$?
31
32exit $result
33