Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcomm-2
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --no-location option.
5
6 cat <<EOF > mcomm-test2.in1
7 #: first.c:123
8 msgid "1"
9 msgstr "1x"
10 EOF
11
12 cat <<EOF > mcomm-test2.in2
13 #: hunt.c:759
14 msgid "2"
15 msgstr "2x"
16 EOF
17
18 : ${MSGCOMM=msgcomm}
19 ${MSGCOMM} --more-than=0 --no-location -o mcomm-test2.tmp \
20     mcomm-test2.in1 mcomm-test2.in2 || exit 1
21 LC_ALL=C tr -d '\r' < mcomm-test2.tmp > mcomm-test2.out || exit 1
22
23 cat << EOF > mcomm-test2.ok
24 msgid "1"
25 msgstr "1x"
26
27 msgid "2"
28 msgstr "2x"
29 EOF
30
31 : ${DIFF=diff}
32 ${DIFF} mcomm-test2.ok mcomm-test2.out
33 result=$?
34
35 exit $result