1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test that the msgmerge output is stable under an 'msgcat' invocation. 5# Also test what happens with the 'no-wrap' flag during msgmerge. 6 7cat <<\EOF > mm-test27.po 8msgid "" 9msgstr "" 10"Content-Type: text/plain; charset=UTF-8\n" 11"Content-Transfer-Encoding: 8bit\n" 12 13msgid "This is a long paragraph that gets wrapped into several lines because it is so long." 14msgstr "Dies ist ein langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil er so lang ist." 15 16#, no-wrap 17msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 18msgstr "Dies ist ein langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 19 20msgid "This is another long paragraph that gets wrapped into several lines because it is so long." 21msgstr "Dies ist ein weiterer langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil er so lang ist." 22 23#, no-wrap 24msgid "This is another long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 25msgstr "Dies ist ein weiterer langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 26EOF 27 28cat <<\EOF > mm-test27-1.pot 29#, fuzzy 30msgid "" 31msgstr "" 32"Project-Id-Version: PACKAGE VERSION\n" 33"Report-Msgid-Bugs-To: \n" 34"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 35"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 36"Language-Team: LANGUAGE <LL@li.org>\n" 37"MIME-Version: 1.0\n" 38"Content-Type: text/plain; charset=UTF-8\n" 39"Content-Transfer-Encoding: 8bit\n" 40 41msgid "This is a long paragraph that gets wrapped into several lines because it is so long." 42msgstr "" 43 44#, no-wrap 45msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 46msgstr "" 47EOF 48 49: ${MSGMERGE=msgmerge} 50${MSGMERGE} -q -o mm-test27.tmp.po mm-test27.po mm-test27-1.pot || Exit 1 51LC_ALL=C tr -d '\r' < mm-test27.tmp.po > mm-test27.new.po || Exit 1 52 53: ${MSGCAT=msgcat} 54${MSGCAT} mm-test27.new.po > mm-test27.tmp.po || Exit 1 55LC_ALL=C tr -d '\r' < mm-test27.tmp.po > mm-test27.cat.po || Exit 1 56 57: ${DIFF=diff} 58${DIFF} mm-test27.new.po mm-test27.cat.po || Exit 1 59 60cat <<\EOF > mm-test27-1.ok 61msgid "" 62msgstr "" 63"Report-Msgid-Bugs-To: \n" 64"Content-Type: text/plain; charset=UTF-8\n" 65"Content-Transfer-Encoding: 8bit\n" 66 67msgid "" 68"This is a long paragraph that gets wrapped into several lines because it is " 69"so long." 70msgstr "" 71"Dies ist ein langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil " 72"er so lang ist." 73 74#, no-wrap 75msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 76msgstr "Dies ist ein langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 77 78#~ msgid "" 79#~ "This is another long paragraph that gets wrapped into several lines " 80#~ "because it is so long." 81#~ msgstr "" 82#~ "Dies ist ein weiterer langer Abschnitt, der in mehrere Zeilen umgebrochen " 83#~ "wird, weil er so lang ist." 84 85#, no-wrap 86#~ msgid "This is another long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 87#~ msgstr "Dies ist ein weiterer langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 88EOF 89 90: ${DIFF=diff} 91${DIFF} mm-test27-1.ok mm-test27.new.po || Exit 1 92 93# Now test what happens with the 'no-wrap' flag when merging with a POT file 94# where the 'no-wrap' flag is set. 95 96cat <<\EOF > mm-test27-2.pot 97#, fuzzy 98msgid "" 99msgstr "" 100"Project-Id-Version: PACKAGE VERSION\n" 101"Report-Msgid-Bugs-To: \n" 102"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 103"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 104"Language-Team: LANGUAGE <LL@li.org>\n" 105"MIME-Version: 1.0\n" 106"Content-Type: text/plain; charset=UTF-8\n" 107"Content-Transfer-Encoding: 8bit\n" 108 109#, no-wrap 110msgid "This is a long paragraph that gets wrapped into several lines because it is so long." 111msgstr "" 112 113#, no-wrap 114msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 115msgstr "" 116 117#, no-wrap 118msgid "This is another long paragraph that gets wrapped into several lines because it is so long." 119msgstr "" 120 121#, no-wrap 122msgid "This is another long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 123msgstr "" 124EOF 125 126: ${MSGMERGE=msgmerge} 127${MSGMERGE} -q -o mm-test27.tmp.po mm-test27.new.po mm-test27-2.pot || Exit 1 128LC_ALL=C tr -d '\r' < mm-test27.tmp.po > mm-test27-2.po || Exit 1 129 130cat <<\EOF > mm-test27-2.ok 131msgid "" 132msgstr "" 133"Report-Msgid-Bugs-To: \n" 134"Content-Type: text/plain; charset=UTF-8\n" 135"Content-Transfer-Encoding: 8bit\n" 136 137#, no-wrap 138msgid "This is a long paragraph that gets wrapped into several lines because it is so long." 139msgstr "Dies ist ein langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil er so lang ist." 140 141#, no-wrap 142msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 143msgstr "Dies ist ein langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 144 145#, no-wrap 146msgid "This is another long paragraph that gets wrapped into several lines because it is so long." 147msgstr "Dies ist ein weiterer langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil er so lang ist." 148 149#, no-wrap 150msgid "This is another long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 151msgstr "Dies ist ein weiterer langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, weil er als 'no-wrap' markiert ist." 152EOF 153 154: ${DIFF=diff} 155${DIFF} mm-test27-2.ok mm-test27-2.po || Exit 1 156 157# Now test what happens with the 'no-wrap' flag when merging with a POT file 158# where the 'no-wrap' flag is absent. 159 160cat <<\EOF > mm-test27-3.pot 161#, fuzzy 162msgid "" 163msgstr "" 164"Project-Id-Version: PACKAGE VERSION\n" 165"Report-Msgid-Bugs-To: \n" 166"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 167"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 168"Language-Team: LANGUAGE <LL@li.org>\n" 169"MIME-Version: 1.0\n" 170"Content-Type: text/plain; charset=UTF-8\n" 171"Content-Transfer-Encoding: 8bit\n" 172 173msgid "This is a long paragraph that gets wrapped into several lines because it is so long." 174msgstr "" 175 176msgid "This is a long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 177msgstr "" 178 179msgid "This is another long paragraph that gets wrapped into several lines because it is so long." 180msgstr "" 181 182msgid "This is another long paragraph that does not get wrapped into several lines because it is marked as 'no-wrap'." 183msgstr "" 184EOF 185 186: ${MSGMERGE=msgmerge} 187${MSGMERGE} -q -o mm-test27.tmp.po mm-test27.new.po mm-test27-3.pot || Exit 1 188LC_ALL=C tr -d '\r' < mm-test27.tmp.po > mm-test27-3.po || Exit 1 189 190cat <<\EOF > mm-test27-3.ok 191msgid "" 192msgstr "" 193"Report-Msgid-Bugs-To: \n" 194"Content-Type: text/plain; charset=UTF-8\n" 195"Content-Transfer-Encoding: 8bit\n" 196 197msgid "" 198"This is a long paragraph that gets wrapped into several lines because it is " 199"so long." 200msgstr "" 201"Dies ist ein langer Abschnitt, der in mehrere Zeilen umgebrochen wird, weil " 202"er so lang ist." 203 204msgid "" 205"This is a long paragraph that does not get wrapped into several lines " 206"because it is marked as 'no-wrap'." 207msgstr "" 208"Dies ist ein langer Abschnitt, der nicht in mehrere Zeilen umgebrochen wird, " 209"weil er als 'no-wrap' markiert ist." 210 211msgid "" 212"This is another long paragraph that gets wrapped into several lines because " 213"it is so long." 214msgstr "" 215"Dies ist ein weiterer langer Abschnitt, der in mehrere Zeilen umgebrochen " 216"wird, weil er so lang ist." 217 218msgid "" 219"This is another long paragraph that does not get wrapped into several lines " 220"because it is marked as 'no-wrap'." 221msgstr "" 222"Dies ist ein weiterer langer Abschnitt, der nicht in mehrere Zeilen " 223"umgebrochen wird, weil er als 'no-wrap' markiert ist." 224EOF 225 226: ${DIFF=diff} 227${DIFF} mm-test27-3.ok mm-test27-3.po || Exit 1 228 229Exit 0 230