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