~win-cross-dev/win-cross/gettext

« back to all changes in this revision

Viewing changes to gettext-tools/tests/msgcomm-6

  • Committer: Nathan Osman
  • Date: 2012-08-11 05:06:52 UTC
  • Revision ID: admin@quickmediasolutions.com-20120811050652-ochkxjtonbw6kkve
Initial commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Test --no-location option when there is a header.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles mcomm-test6.in1 mcomm-test6.in2"
 
9
cat <<EOF > mcomm-test6.in1
 
10
msgid ""
 
11
msgstr ""
 
12
"Project-Id-Version: GNU one 1.2.3\n"
 
13
"POT-Creation-Date: 2000-12-11 20:49+0100\n"
 
14
"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
 
15
"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
 
16
"Language-Team: German <de@li.org>\n"
 
17
"MIME-Version: 1.0\n"
 
18
"Content-Type: text/plain; charset=iso-8859-1\n"
 
19
"Content-Transfer-Encoding: 8bit\n"
 
20
 
 
21
#: first.c:123
 
22
msgid "1"
 
23
msgstr "1x"
 
24
EOF
 
25
 
 
26
cat <<EOF > mcomm-test6.in2
 
27
#: hunt.c:759
 
28
msgid "2"
 
29
msgstr "2x"
 
30
EOF
 
31
 
 
32
tmpfiles="$tmpfiles mcomm-test6.tmp mcomm-test6.out"
 
33
: ${MSGCOMM=msgcomm}
 
34
${MSGCOMM} --more-than=0 --no-location -o mcomm-test6.tmp \
 
35
    mcomm-test6.in1 mcomm-test6.in2
 
36
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
37
LC_ALL=C tr -d '\r' < mcomm-test6.tmp > mcomm-test6.out
 
38
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
39
 
 
40
tmpfiles="$tmpfiles mcomm-test6.ok"
 
41
cat << EOF > mcomm-test6.ok
 
42
msgid ""
 
43
msgstr ""
 
44
"Project-Id-Version: GNU one 1.2.3\n"
 
45
"POT-Creation-Date: 2000-12-11 20:49+0100\n"
 
46
"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
 
47
"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
 
48
"Language-Team: German <de@li.org>\n"
 
49
"MIME-Version: 1.0\n"
 
50
"Content-Type: text/plain; charset=iso-8859-1\n"
 
51
"Content-Transfer-Encoding: 8bit\n"
 
52
 
 
53
msgid "1"
 
54
msgstr "1x"
 
55
 
 
56
msgid "2"
 
57
msgstr "2x"
 
58
EOF
 
59
 
 
60
: ${DIFF=diff}
 
61
${DIFF} mcomm-test6.ok mcomm-test6.out
 
62
result=$?
 
63
 
 
64
rm -fr $tmpfiles
 
65
 
 
66
exit $result