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