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