1 #! /bin/sh 2 3 # Test of an external command. 4 5 tmpfiles="" 6 trap 'rm -fr $tmpfiles' 1 2 3 15 7 8 tmpfiles="$tmpfiles mex-test1.po" 9 cat <<\EOF > mex-test1.po 10 # HEADER. 11 # 12 msgid "" 13 msgstr "" 14 "Project-Id-Version: Bonnie Tyler\n" 15 "Content-Type: text/plain; charset=ISO-8859-1\n" 16 "Content-Transfer-Encoding: 8bit\n" 17 18 #: married-men:4 19 #, fuzzy 20 msgid "The world is full of married men" 21 msgstr "So viele verheiratete Mnner" 22 23 #: married-men:5 24 msgid "with wives who never understand" 25 msgstr "und ihre Frauen verstehen sie nicht" 26 27 #: married-men:6 28 msgid "They're looking for someone to share" 29 msgstr "" 30 31 # schwer zu bersetzen... 32 #: married-men:7 33 msgid "the excitement of a love affair" 34 msgstr "" 35 36 #: married-men:8 37 msgid "Just as soon as they find you" 38 msgstr "" 39 40 #: married-men:9 41 msgid "They warn you and darn you" 42 msgstr "" 43 44 #~ msgid "You fly on the wings of romance" 45 #~ msgstr "Die Flgel der frischen Liebe\n" 46 #~ "heben dich zum Himmel" 47 48 #, fuzzy 49 #~ msgid "In the eyes of the world" 50 #~ msgstr "Fr die anderen" 51 52 # Etwas freie bersetzung. 53 #~ msgid "You're just another crazy girl" 54 #~ msgstr "bist du blo ein verrcktes dummes Ding" 55 56 #~ msgid "Who loves a married man" 57 #~ msgstr "das einen verheirateten Mann liebt" 58 EOF 59 60 tmpfiles="$tmpfiles mex-test1.sh" 61 cat <<\EOF > mex-test1.sh 62 #! /bin/sh 63 echo "========================= $MSGEXEC_LOCATION =========================" 64 cat <<MEOF 65 $MSGEXEC_MSGID 66 --- 67 MEOF 68 cat 69 echo 70 exit 0 71 EOF 72 chmod a+x mex-test1.sh 73 74 tmpfiles="$tmpfiles mex-test1.out" 75 : ${MSGEXEC=msgexec} 76 ${MSGEXEC} -i mex-test1.po ./mex-test1.sh > mex-test1.out 77 test $? = 0 || { rm -fr $tmpfiles; exit 1; } 78 79 tmpfiles="$tmpfiles mex-test1.ok" 80 cat <<\EOF > mex-test1.ok 81 ========================= mex-test1.po:4 ========================= 82 83 --- 84 Project-Id-Version: Bonnie Tyler 85 Content-Type: text/plain; charset=ISO-8859-1 86 Content-Transfer-Encoding: 8bit 87 88 ========================= mex-test1.po:12 ========================= 89 The world is full of married men 90 --- 91 So viele verheiratete Mnner 92 ========================= mex-test1.po:16 ========================= 93 with wives who never understand 94 --- 95 und ihre Frauen verstehen sie nicht 96 ========================= mex-test1.po:20 ========================= 97 They're looking for someone to share 98 --- 99 100 ========================= mex-test1.po:25 ========================= 101 the excitement of a love affair 102 --- 103 104 ========================= mex-test1.po:29 ========================= 105 Just as soon as they find you 106 --- 107 108 ========================= mex-test1.po:33 ========================= 109 They warn you and darn you 110 --- 111 112 ========================= mex-test1.po:36 ========================= 113 You fly on the wings of romance 114 --- 115 Die Flgel der frischen Liebe 116 heben dich zum Himmel 117 ========================= mex-test1.po:41 ========================= 118 In the eyes of the world 119 --- 120 Fr die anderen 121 ========================= mex-test1.po:45 ========================= 122 You're just another crazy girl 123 --- 124 bist du blo ein verrcktes dummes Ding 125 ========================= mex-test1.po:48 ========================= 126 Who loves a married man 127 --- 128 das einen verheirateten Mann liebt 129 EOF 130 131 : ${DIFF=diff} 132 ${DIFF} mex-test1.ok mex-test1.out 133 result=$? 134 135 rm -fr $tmpfiles 136 137 exit $result 138