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