1#! /bin/sh
2
3# Test --more-than=0; identical message are wanted once only.
4# If both occurrences are fuzzy, keep the fuzzy mark.
5
6tmpfiles=""
7trap 'rm -fr $tmpfiles' 1 2 3 15
8
9tmpfiles="$tmpfiles mcomm-test21.in1 mcomm-test21.in2"
10cat <<EOF > mcomm-test21.in1
11# Not sure.
12#: first.c:123
13#, fuzzy
14msgid "1"
15msgstr "1x"
16EOF
17
18cat <<EOF > mcomm-test21.in2
19# Doubt.
20#: hunt.c:759
21#, fuzzy
22msgid "1"
23msgstr "1x"
24EOF
25
26tmpfiles="$tmpfiles mcomm-test21.tmp mcomm-test21.out"
27: ${MSGCOMM=msgcomm}
28${MSGCOMM} --more-than=0 -o mcomm-test21.tmp mcomm-test21.in1 mcomm-test21.in2
29test $? = 0 || { rm -fr $tmpfiles; exit 1; }
30tr -d '\r' < mcomm-test21.tmp > mcomm-test21.out
31test $? = 0 || { rm -fr $tmpfiles; exit 1; }
32
33tmpfiles="$tmpfiles mcomm-test21.ok"
34cat << EOF > mcomm-test21.ok
35# Not sure.
36#: first.c:123 hunt.c:759
37#, fuzzy
38msgid "1"
39msgstr "1x"
40EOF
41
42: ${DIFF=diff}
43${DIFF} mcomm-test21.ok mcomm-test21.out
44result=$?
45
46rm -fr $tmpfiles
47
48exit $result
49