1#! /bin/sh 2 3# Test that --less-than=2 removes entries which occur twice and keeps entries 4# which occur only once. 5 6tmpfiles="" 7trap 'rm -fr $tmpfiles' 1 2 3 15 8 9# unique msg in in3 10 11tmpfiles="$tmpfiles mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3" 12cat <<EOF > mcomm-test12.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# duplicate (cf. in2) 25#: first.c:123 26msgid "1" 27msgstr "1x" 28EOF 29 30cat <<EOF > mcomm-test12.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# duplicate (cf. in1) 43#: hunt.c:759 44msgid "1" 45msgstr "" 46EOF 47 48cat <<EOF > mcomm-test12.in3 49msgid "" 50msgstr "" 51"Project-Id-Version: GNU one 1.2.3\n" 52"POT-Creation-Date: 2000-12-11 20:49+0100\n" 53"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 54"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 55"Language-Team: German <de@li.org>\n" 56"MIME-Version: 1.0\n" 57"Content-Type: text/plain; charset=iso-8859-1\n" 58"Content-Transfer-Encoding: 8bit\n" 59 60# unique 61#: hunt.c:890 62msgid "2" 63msgstr "" 64EOF 65 66tmpfiles="$tmpfiles mcomm-test12.out" 67: ${MSGCOMM=msgcomm} 68 69# --unique is shorthand for --less-than=2; do we've to test both 70# switches? Are 'for' loops allowed? -ke- 71${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test12.out \ 72 mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3 73test $? = 0 || { rm -fr $tmpfiles; exit 1; } 74 75tmpfiles="$tmpfiles mcomm-test12.ok" 76cat << EOF > mcomm-test12.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" 87 88# unique 89msgid "2" 90msgstr "" 91EOF 92 93: ${DIFF=diff} 94${DIFF} mcomm-test12.ok mcomm-test12.out 95result=$? 96 97rm -fr $tmpfiles 98 99exit $result 100