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