xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgcomm-19 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
1#! /bin/sh
2
3# Test --more-than=0; identical message are wanted once only.
4# If the first occurrence is fuzzy, keep the fuzzy mark.
5
6tmpfiles=""
7trap 'rm -fr $tmpfiles' 1 2 3 15
8
9tmpfiles="$tmpfiles mcomm-test19.in1 mcomm-test19.in2"
10cat <<EOF > mcomm-test19.in1
11# Not sure.
12#: first.c:123
13#, fuzzy
14msgid "1"
15msgstr "1x"
16EOF
17
18cat <<EOF > mcomm-test19.in2
19# Sure.
20#: hunt.c:759
21msgid "1"
22msgstr "1x"
23EOF
24
25tmpfiles="$tmpfiles mcomm-test19.out"
26: ${MSGCOMM=msgcomm}
27${MSGCOMM} --more-than=0 -o mcomm-test19.out mcomm-test19.in1 mcomm-test19.in2
28test $? = 0 || { rm -fr $tmpfiles; exit 1; }
29
30tmpfiles="$tmpfiles mcomm-test19.ok"
31cat << EOF > mcomm-test19.ok
32# Not sure.
33#: first.c:123 hunt.c:759
34#, fuzzy
35msgid "1"
36msgstr "1x"
37EOF
38
39: ${DIFF=diff}
40${DIFF} mcomm-test19.ok mcomm-test19.out
41result=$?
42
43rm -fr $tmpfiles
44
45exit $result
46