1 #! /bin/sh 2 3 # Test msgconv on a PO file with previous msgids. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles mco-test6.po" 9 cat <<\EOF > mco-test6.po 10 msgid "" 11 msgstr "" 12 "Report-Msgid-Bugs-To: \n" 13 "Content-Type: text/plain; charset=UTF-8\n" 14 "Content-Transfer-Encoding: 8bit\n" 15 16 #, fuzzy 17 #| msgid " Frobby Inc." 18 msgid "(C) Frobby Inc." 19 msgstr "(C) Dingsbums GmbH" 20 21 #, fuzzy 22 #| msgid "full 360" 23 msgid "full turn" 24 msgstr "Volle 360 Grad" 25 EOF 26 27 tmpfiles="$tmpfiles mco-test6.out" 28 : ${MSGCONV=msgconv} 29 ${MSGCONV} --to-code=ISO-8859-1 -o mco-test6.out mco-test6.po 30 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 31 32 tmpfiles="$tmpfiles mco-test6.ok" 33 cat <<\EOF > mco-test6.ok 34 msgid "" 35 msgstr "" 36 "Report-Msgid-Bugs-To: \n" 37 "Content-Type: text/plain; charset=ISO-8859-1\n" 38 "Content-Transfer-Encoding: 8bit\n" 39 40 #, fuzzy 41 #| msgid " Frobby Inc." 42 msgid "(C) Frobby Inc." 43 msgstr "(C) Dingsbums GmbH" 44 45 #, fuzzy 46 #| msgid "full 360" 47 msgid "full turn" 48 msgstr "Volle 360 Grad" 49 EOF 50 51 : ${DIFF=diff} 52 ${DIFF} mco-test6.ok mco-test6.out 53 result=$? 54 55 rm -fr $tmpfiles 56 57 exit $result 58