~ubuntu-branches/ubuntu/breezy/gettext/breezy

« back to all changes in this revision

Viewing changes to gettext-tools/tests/xgettext-c-2

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2004-03-14 17:40:02 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314174002-p1ad5ldve1hqzhye
Tags: 0.14.1-2
* Added libexpat1-dev to Build-Depends, for glade support.
* Added libc0.1-dev to Build-Depends, for GNU/kFreeBSD.
* Removed special-casing of knetbsd-gnu in debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Test C support: comments meant for xgettext, and whitespace.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles xg-c-2.in.c"
 
9
cat <<EOF > xg-c-2.in.c
 
10
This is a test of the xgettext functionality.
 
11
/* xgettext:no-c-format */
 
12
_("extract me")
 
13
Sometimes keywords can be spread apart
 
14
xgettext:no-c-format
 
15
_ ( "what about me" )
 
16
And even further on accasion
 
17
_
 
18
(
 
19
"hello"
 
20
)
 
21
EOF
 
22
 
 
23
tmpfiles="$tmpfiles xg-c-2.po"
 
24
: ${XGETTEXT=xgettext}
 
25
${XGETTEXT} -d xg-c-2 -k_ --omit-header --no-location xg-c-2.in.c
 
26
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
27
 
 
28
tmpfiles="$tmpfiles xg-c-2.ok"
 
29
cat <<EOF > xg-c-2.ok
 
30
#, no-c-format
 
31
msgid "extract me"
 
32
msgstr ""
 
33
 
 
34
msgid "what about me"
 
35
msgstr ""
 
36
 
 
37
msgid "hello"
 
38
msgstr ""
 
39
EOF
 
40
 
 
41
: ${DIFF=diff}
 
42
${DIFF} xg-c-2.ok xg-c-2.po
 
43
result=$?
 
44
 
 
45
rm -fr $tmpfiles
 
46
 
 
47
exit $result