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

« back to all changes in this revision

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

  • 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.
 
4
 
 
5
tmpfiles=""
 
6
trap 'rm -fr $tmpfiles' 1 2 3 15
 
7
 
 
8
tmpfiles="$tmpfiles mcomm-test2.in1 mcomm-test2.in2"
 
9
cat <<EOF > mcomm-test2.in1
 
10
#: first.c:123
 
11
msgid "1"
 
12
msgstr "1x"
 
13
EOF
 
14
 
 
15
cat <<EOF > mcomm-test2.in2
 
16
#: hunt.c:759
 
17
msgid "2"
 
18
msgstr "2x"
 
19
EOF
 
20
 
 
21
tmpfiles="$tmpfiles mcomm-test2.tmp mcomm-test2.out"
 
22
: ${MSGCOMM=msgcomm}
 
23
${MSGCOMM} --more-than=0 --no-location -o mcomm-test2.tmp \
 
24
    mcomm-test2.in1 mcomm-test2.in2
 
25
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
26
LC_ALL=C tr -d '\r' < mcomm-test2.tmp > mcomm-test2.out
 
27
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 
28
 
 
29
tmpfiles="$tmpfiles mcomm-test2.ok"
 
30
cat << EOF > mcomm-test2.ok
 
31
msgid "1"
 
32
msgstr "1x"
 
33
 
 
34
msgid "2"
 
35
msgstr "2x"
 
36
EOF
 
37
 
 
38
: ${DIFF=diff}
 
39
${DIFF} mcomm-test2.ok mcomm-test2.out
 
40
result=$?
 
41
 
 
42
rm -fr $tmpfiles
 
43
 
 
44
exit $result