1*946379e7Schristos#! /bin/sh 2*946379e7Schristos 3*946379e7Schristos# Test that without --force-po option, a PO file without translations is 4*946379e7Schristos# not created. 5*946379e7Schristos 6*946379e7Schristostmpfiles="" 7*946379e7Schristostrap 'rm -fr $tmpfiles' 1 2 3 15 8*946379e7Schristos 9*946379e7Schristos# no unique msg in input files. 10*946379e7Schristos# with --force-po create an empty PO file; cf. msgcomm-14 11*946379e7Schristos 12*946379e7Schristostmpfiles="$tmpfiles mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3" 13*946379e7Schristoscat <<EOF > mcomm-test15.in1 14*946379e7Schristosmsgid "" 15*946379e7Schristosmsgstr "" 16*946379e7Schristos"Project-Id-Version: GNU one 1.2.3\n" 17*946379e7Schristos"POT-Creation-Date: 2000-12-11 20:49+0100\n" 18*946379e7Schristos"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 19*946379e7Schristos"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 20*946379e7Schristos"Language-Team: German <de@li.org>\n" 21*946379e7Schristos"MIME-Version: 1.0\n" 22*946379e7Schristos"Content-Type: text/plain; charset=iso-8859-1\n" 23*946379e7Schristos"Content-Transfer-Encoding: 8bit\n" 24*946379e7Schristos 25*946379e7Schristos# occurs 3 times 26*946379e7Schristos#: first.c:123 27*946379e7Schristosmsgid "1" 28*946379e7Schristosmsgstr "1x" 29*946379e7SchristosEOF 30*946379e7Schristos 31*946379e7Schristoscat <<EOF > mcomm-test15.in2 32*946379e7Schristosmsgid "" 33*946379e7Schristosmsgstr "" 34*946379e7Schristos"Project-Id-Version: GNU one 1.2.3\n" 35*946379e7Schristos"POT-Creation-Date: 2000-12-11 20:49+0100\n" 36*946379e7Schristos"PO-Revision-Date: 2000-03-18 15:25+01:00\n" 37*946379e7Schristos"Last-Translator: Karl Eichwalder <ke@suse.de>\n" 38*946379e7Schristos"Language-Team: German <de@li.org>\n" 39*946379e7Schristos"MIME-Version: 1.0\n" 40*946379e7Schristos"Content-Type: text/plain; charset=iso-8859-1\n" 41*946379e7Schristos"Content-Transfer-Encoding: 8bit\n" 42*946379e7Schristos 43*946379e7Schristos#: hunt.c:759 44*946379e7Schristosmsgid "1" 45*946379e7Schristosmsgstr "" 46*946379e7SchristosEOF 47*946379e7Schristos 48*946379e7Schristoscat <<EOF > mcomm-test15.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#: hunt.c:789 61*946379e7Schristosmsgid "1" 62*946379e7Schristosmsgstr "" 63*946379e7SchristosEOF 64*946379e7Schristos 65*946379e7Schristostmpfiles="$tmpfiles mcomm-test15.out" 66*946379e7Schristosrm -f mcomm-test15.out 67*946379e7Schristos 68*946379e7Schristos: ${MSGCOMM=msgcomm} 69*946379e7Schristos 70*946379e7Schristos# --unique is shorthand for --less-than=2; do we've to test both 71*946379e7Schristos# switches? Are 'for' loops allowed? -ke- 72*946379e7Schristos${MSGCOMM} --less-than=2 --no-location -o mcomm-test15.out \ 73*946379e7Schristos mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3 74*946379e7Schristostest $? = 0 || { rm -fr $tmpfiles; exit 1; } 75*946379e7Schristos 76*946379e7Schristos# we've no unique msg; thus no PO should be created. 77*946379e7Schristosif test -f mcomm-test15.out; then 78*946379e7Schristos echo "mcomm-test15.out wrongly written." 79*946379e7Schristos result=1 80*946379e7Schristoselse 81*946379e7Schristos result=0 82*946379e7Schristosfi 83*946379e7Schristos 84*946379e7Schristosrm -fr $tmpfiles 85*946379e7Schristos 86*946379e7Schristosexit $result 87