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

« back to all changes in this revision

Viewing changes to tests/msgcmp-2

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2002-04-10 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20020410131742-npf89tsaygdolprj
Tags: upstream-0.10.40
ImportĀ upstreamĀ versionĀ 0.10.40

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# One argument is required which is the path to the toplevel directory
 
3
# of the distribution.
 
4
 
 
5
LANGUAGE=
 
6
LC_ALL=
 
7
LC_MESSAGES=
 
8
LANG=
 
9
export LANGUAGE LC_ALL LC_MESSAGES LANG
 
10
 
 
11
tmpfiles="mc-test2.in1 mc-test2.in2"
 
12
cat <<EOF > mc-test2.in1
 
13
msgid "one" msgstr "first"
 
14
msgid "two" msgstr "second"
 
15
msgid "three" msgstr "third"
 
16
msgid "four" msgstr "fourth"
 
17
EOF
 
18
 
 
19
cat <<EOF > mc-test2.in2
 
20
msgid "thre" msgstr "" #i.e. pretend a typo in the program
 
21
msgid "one" msgstr ""
 
22
msgid "two" msgstr ""
 
23
EOF
 
24
 
 
25
tmpfiles="$tmpfiles mc-test2.out"
 
26
: ${MSGCMP=msgcmp}
 
27
${MSGCMP} mc-test2.in1 mc-test2.in2 > mc-test2.out 2>&1
 
28
 
 
29
tmpfiles="$tmpfiles mc-test2.ok"
 
30
cat <<EOF > mc-test2.ok
 
31
mc-test2.in2:1: this message is used but not defined...
 
32
mc-test2.in1:3: ...but this definition is similar
 
33
mc-test2.in1:4: warning: this message is not used
 
34
found 1 fatal error
 
35
EOF
 
36
 
 
37
: ${DIFF=diff}
 
38
${DIFF} mc-test2.ok mc-test2.out
 
39
result=$?
 
40
 
 
41
rm -fr $tmpfiles
 
42
 
 
43
exit $result