1 #! /bin/sh 2 3 # Test msgcat on a PO files with previous msgids. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles mcat-test16.in1" 9 cat <<\EOF > mcat-test16.in1 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 #. TRANSLATORS: An error message. 17 #: src/args.c:242 18 #, fuzzy, c-format 19 #| msgid "too many arguments" 20 msgid "too large arguments" 21 msgstr "zu viele Argumente" 22 23 # Oder besser "fehlende Argumente"? 24 #. TRANSLATORS: An error message. 25 #: src/args.c:273 26 #, c-format 27 #| msgid "missing arguments" 28 msgid "Missing arguments." 29 msgstr "Argumente fehlen." 30 EOF 31 32 tmpfiles="$tmpfiles mcat-test16.in2" 33 cat <<\EOF > mcat-test16.in2 34 msgid "" 35 msgstr "" 36 "Report-Msgid-Bugs-To: \n" 37 "Content-Type: text/plain; charset=UTF-8\n" 38 "Content-Transfer-Encoding: 8bit\n" 39 40 #. TRANSLATORS: An error message. 41 #: src/args.c:242 42 #, fuzzy, c-format 43 #| msgid "too few arguments" 44 msgid "too large arguments" 45 msgstr "zu wenige Argumente" 46 EOF 47 48 tmpfiles="$tmpfiles mcat-test16.out" 49 rm -f mcat-test16.out 50 : ${MSGCAT=msgcat} 51 ${MSGCAT} -o mcat-test16.out mcat-test16.in1 mcat-test16.in2 52 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 53 54 tmpfiles="$tmpfiles mcat-test16.ok" 55 cat <<\EOF > mcat-test16.ok 56 msgid "" 57 msgstr "" 58 "Report-Msgid-Bugs-To: \n" 59 "Content-Type: text/plain; charset=UTF-8\n" 60 "Content-Transfer-Encoding: 8bit\n" 61 62 #. TRANSLATORS: An error message. 63 #: src/args.c:242 64 #, fuzzy, c-format 65 msgid "too large arguments" 66 msgstr "" 67 "#-#-#-#-# mcat-test16.in1 #-#-#-#-#\n" 68 "zu viele Argumente\n" 69 "#-#-#-#-# mcat-test16.in2 #-#-#-#-#\n" 70 "zu wenige Argumente" 71 72 # Oder besser "fehlende Argumente"? 73 #. TRANSLATORS: An error message. 74 #: src/args.c:273 75 #, c-format 76 #| msgid "missing arguments" 77 msgid "Missing arguments." 78 msgstr "Argumente fehlen." 79 EOF 80 81 : ${DIFF=diff} 82 ${DIFF} mcat-test16.ok mcat-test16.out 83 result=$? 84 85 rm -fr $tmpfiles 86 87 exit $result 88