1#! /bin/sh 2 3# Test --force-po option. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8# no unique msg in input files. 9# without --force-po don't create any PO file; cf. msgcomm-15 10 11tmpfiles="$tmpfiles mcomm-test14.in1 mcomm-test14.in2 mcomm-test14.in3" 12cat <<EOF > mcomm-test14.in1 13msgid "" 14msgstr "" 15"Project-Id-Version: GNU one 1.2.3\n" 16"POT-Creation-Date: 2000-12-11 20:49+0100\n" 17"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 18"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 19"Language-Team: German <de@li.org>\n" 20"MIME-Version: 1.0\n" 21"Content-Type: text/plain; charset=iso-8859-1\n" 22"Content-Transfer-Encoding: 8bit\n" 23 24# occurs 3 times 25#: first.c:123 26msgid "1" 27msgstr "1x" 28EOF 29 30cat <<EOF > mcomm-test14.in2 31msgid "" 32msgstr "" 33"Project-Id-Version: GNU one 1.2.3\n" 34"POT-Creation-Date: 2000-12-11 20:49+0100\n" 35"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 36"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 37"Language-Team: German <de@li.org>\n" 38"MIME-Version: 1.0\n" 39"Content-Type: text/plain; charset=iso-8859-1\n" 40"Content-Transfer-Encoding: 8bit\n" 41 42#: hunt.c:759 43msgid "1" 44msgstr "" 45EOF 46 47cat <<EOF > mcomm-test14.in3 48msgid "" 49msgstr "" 50"Project-Id-Version: GNU one 1.2.3\n" 51"POT-Creation-Date: 2000-12-11 20:49+0100\n" 52"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 53"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 54"Language-Team: German <de@li.org>\n" 55"MIME-Version: 1.0\n" 56"Content-Type: text/plain; charset=iso-8859-1\n" 57"Content-Transfer-Encoding: 8bit\n" 58 59#: hunt.c:789 60msgid "1" 61msgstr "" 62EOF 63 64tmpfiles="$tmpfiles mcomm-test14.tmp mcomm-test14.out" 65: ${MSGCOMM=msgcomm} 66 67# --unique is shorthand for --less-than=2; do we've to test both 68# switches? Are 'for' loops allowed? -ke- 69${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test14.tmp \ 70 mcomm-test14.in1 mcomm-test14.in2 mcomm-test14.in3 71test $? = 0 || { rm -fr $tmpfiles; exit 1; } 72tr -d '\r' < mcomm-test14.tmp > mcomm-test14.out 73test $? = 0 || { rm -fr $tmpfiles; exit 1; } 74 75tmpfiles="$tmpfiles mcomm-test14.ok" 76cat << EOF > mcomm-test14.ok 77msgid "" 78msgstr "" 79"Project-Id-Version: GNU one 1.2.3\n" 80"POT-Creation-Date: 2000-12-11 20:49+0100\n" 81"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 82"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 83"Language-Team: German <de@li.org>\n" 84"MIME-Version: 1.0\n" 85"Content-Type: text/plain; charset=iso-8859-1\n" 86"Content-Transfer-Encoding: 8bit\n" 87EOF 88 89: ${DIFF=diff} 90${DIFF} mcomm-test14.ok mcomm-test14.out 91result=$? 92 93rm -fr $tmpfiles 94 95exit $result 96