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