No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcomm-3
blob71fa2a2cd71d7d26c6892a88e72a75ddbe8785e6
1 #! /bin/sh
3 # Test --omit-header option when there is no header.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles mcomm-test3.in1 mcomm-test3.in2"
9 cat <<EOF > mcomm-test3.in1
10 #: first.c:123
11 msgid "1"
12 msgstr "1x"
13 EOF
15 cat <<EOF > mcomm-test3.in2
16 #: hunt.c:759
17 msgid "2"
18 msgstr "2x"
19 EOF
21 tmpfiles="$tmpfiles mcomm-test3.out"
22 : ${MSGCOMM=msgcomm}
23 ${MSGCOMM} --more-than=0 --omit-header -o mcomm-test3.out \
24 mcomm-test3.in1 mcomm-test3.in2
25 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
27 tmpfiles="$tmpfiles mcomm-test3.ok"
28 cat << EOF > mcomm-test3.ok
29 #: first.c:123
30 msgid "1"
31 msgstr "1x"
33 #: hunt.c:759
34 msgid "2"
35 msgstr "2x"
36 EOF
38 : ${DIFF=diff}
39 ${DIFF} mcomm-test3.ok mcomm-test3.out
40 result=$?
42 rm -fr $tmpfiles
44 exit $result