1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test sed execution. 5 6if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 7 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 8 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 9 ac_n= ac_c=' 10' ac_t=' ' 11 else 12 ac_n=-n ac_c= ac_t= 13 fi 14else 15 ac_n= ac_c='\c' ac_t= 16fi 17 18# Some sed programs (Solaris etc.) omit the last line if it ended without 19# a newline. We must skip this test when we encounter such a broken sed. 20sedoutput=`echo $ac_n "abc$ac_c" | sed -e s/x/x/` 21test -n "$sedoutput" || { 22 echo "Skipping test: sed program is broken" 23 Exit 77 24} 25 26# Some sed programs (IRIX, OSF/1 etc.) add a newline to the last line if it 27# doesn't end with a newline. 28sedoutputcount=`echo $ac_n "abc$ac_c" | sed -e s/x/x/ | wc -c` 29sedoutputcount=`echo "$sedoutputcount" | sed -e 's/[ ]//g'` 30test "$sedoutputcount" = 3 || { 31 echo "Skipping test: sed program inserts extra newline" 32 Exit 77 33} 34 35cat <<\EOF > mfi-test2.po 36# HEADER. 37# 38msgid "" 39msgstr "" 40"Project-Id-Version: Bonnie Tyler\n" 41"Content-Type: text/plain; charset=ISO-8859-1\n" 42"Content-Transfer-Encoding: 8bit\n" 43 44#: married-men:4 45#, fuzzy 46msgid "The world is full of married men" 47msgstr "So viele verheiratete M�nner" 48 49#: married-men:5 50msgid "with wives who never understand" 51msgstr "und ihre Frauen verstehen sie nicht" 52 53#: married-men:6 54msgid "They're looking for someone to share" 55msgstr "" 56 57# schwer zu �bersetzen... 58#: married-men:7 59msgid "the excitement of a love affair" 60msgstr "" 61 62#: married-men:8 63msgid "Just as soon as they find you" 64msgstr "" 65 66#: married-men:9 67msgid "They warn you and darn you" 68msgstr "" 69 70#~ msgid "You fly on the wings of romance" 71#~ msgstr "Die Fl�gel der frischen Liebe heben dich zum Himmel" 72 73#, fuzzy 74#~ msgid "In the eyes of the world" 75#~ msgstr "F�r die anderen" 76 77# Etwas freie �bersetzung. 78#~ msgid "You're just another crazy girl" 79#~ msgstr "bist du blo� ein verr�cktes dummes Ding" 80 81#~ msgid "Who loves a married man" 82#~ msgstr "das einen verheirateten Mann liebt" 83EOF 84 85: ${MSGFILTER=msgfilter} 86sedexpr1='1{ 87s/^/\[\[/ 88}' 89sedexpr2='${ 90s/$/\]\]/ 91}' 92LC_ALL=C \ 93${MSGFILTER} -i mfi-test2.po -o mfi-test2.out sed -e "$sedexpr1" -e "$sedexpr2" >mfi-test2.err 2>&1 94result=$? 95cat mfi-test2.err | grep -v 'warning: Locale charset' | grep -v '^ ' 96test $result = 0 || { Exit 1; } 97 98cat <<\EOF > mfi-test2.ok 99# HEADER. 100# 101msgid "" 102msgstr "" 103"[[Project-Id-Version: Bonnie Tyler\n" 104"Content-Type: text/plain; charset=ISO-8859-1\n" 105"Content-Transfer-Encoding: 8bit]]\n" 106 107#: married-men:4 108#, fuzzy 109msgid "The world is full of married men" 110msgstr "[[So viele verheiratete M�nner]]" 111 112#: married-men:5 113msgid "with wives who never understand" 114msgstr "[[und ihre Frauen verstehen sie nicht]]" 115 116#: married-men:6 117msgid "They're looking for someone to share" 118msgstr "" 119 120# schwer zu �bersetzen... 121#: married-men:7 122msgid "the excitement of a love affair" 123msgstr "" 124 125#: married-men:8 126msgid "Just as soon as they find you" 127msgstr "" 128 129#: married-men:9 130msgid "They warn you and darn you" 131msgstr "" 132 133#~ msgid "You fly on the wings of romance" 134#~ msgstr "[[Die Fl�gel der frischen Liebe heben dich zum Himmel]]" 135 136#, fuzzy 137#~ msgid "In the eyes of the world" 138#~ msgstr "[[F�r die anderen]]" 139 140# Etwas freie �bersetzung. 141#~ msgid "You're just another crazy girl" 142#~ msgstr "[[bist du blo� ein verr�cktes dummes Ding]]" 143 144#~ msgid "Who loves a married man" 145#~ msgstr "[[das einen verheirateten Mann liebt]]" 146EOF 147 148: ${DIFF=diff} 149${DIFF} mfi-test2.ok mfi-test2.out 150result=$? 151 152exit $result 153