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