xref: /netbsd-src/external/gpl2/gettext/dist/gettext-tools/tests/msgcomm-21 (revision 946379e7b37692fc43f68eb0d1c10daa0a7f3b6c)
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.out"
27: ${MSGCOMM=msgcomm}
28${MSGCOMM} --more-than=0 -o mcomm-test21.out mcomm-test21.in1 mcomm-test21.in2
29test $? = 0 || { rm -fr $tmpfiles; exit 1; }
30
31tmpfiles="$tmpfiles mcomm-test21.ok"
32cat << EOF > mcomm-test21.ok
33# Not sure.
34#: first.c:123 hunt.c:759
35#, fuzzy
36msgid "1"
37msgstr "1x"
38EOF
39
40: ${DIFF=diff}
41${DIFF} mcomm-test21.ok mcomm-test21.out
42result=$?
43
44rm -fr $tmpfiles
45
46exit $result
47