2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test --add-location=file option.
6 if (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
18 # Some fold programs (like SunOS4 and FreeBSD) don't have an option to wrap at
20 echo abc | fold -b -s -w 20 >/dev/null 2>&1 || {
21 echo "Skipping test: fold program not POSIX compliant"
25 # Some fold programs (like NetBSD 5.0) remove trailing spaces when wrapping.
26 echo ab cd | fold -b -s -w 3 | grep ' ' >/dev/null || {
27 echo "Skipping test: fold program trims trailing spaces"
31 # Some fold programs (like HP-UX) insert a newline at the end, if the last
32 # line was not terminated with a newline and the -s option was given.
33 foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c`
34 foldoutputcount=`echo "$foldoutputcount" | sed -e 's/[ ]//g'`
35 test "$foldoutputcount" = 3 || {
36 echo "Skipping test: fold program inserts extra newline"
40 cat <<\EOF > mfi-test5.po
45 "Project-Id-Version: Bonnie Tyler\n"
46 "Content-Type: text/plain; charset=ISO-8859-1\n"
47 "Content-Transfer-Encoding: 8bit\n"
51 msgid "The world is full of married men"
52 msgstr "So viele verheiratete Männer"
55 msgid "with wives who never understand"
56 msgstr "und ihre Frauen verstehen sie nicht"
59 msgid "They're looking for someone to share"
62 # schwer zu übersetzen...
64 msgid "the excitement of a love affair"
68 msgid "Just as soon as they find you"
72 msgid "They warn you and darn you"
75 #~ msgid "You fly on the wings of romance"
76 #~ msgstr "Die Flügel der frischen Liebe heben dich zum Himmel"
79 #~ msgid "In the eyes of the world"
80 #~ msgstr "Für die anderen"
82 # Etwas freie Übersetzung.
83 #~ msgid "You're just another crazy girl"
84 #~ msgstr "bist du bloß ein verrücktes dummes Ding"
86 #~ msgid "Who loves a married man"
87 #~ msgstr "das einen verheirateten Mann liebt"
90 : ${MSGFILTER=msgfilter}
91 LC_ALL=C ${MSGFILTER} --add-location=file -i mfi-test5.po -o mfi-test5.out \
92 fold -b -s -w 20 >mfi-test5.err 2>&1
94 cat mfi-test5.err | grep -v 'warning: Locale charset' | grep -v '^ '
95 test $result = 0 || { exit 1; }
97 cat <<\EOF > mfi-test5.ok
102 "Project-Id-Version: \n"
106 "charset=ISO-8859-1\n"
107 "Content-Transfer-Enc\n"
112 msgid "The world is full of married men"
115 "verheiratete Männer"
118 msgid "with wives who never understand"
121 "verstehen sie nicht"
124 msgid "They're looking for someone to share"
127 # schwer zu übersetzen...
129 msgid "the excitement of a love affair"
133 msgid "Just as soon as they find you"
137 msgid "They warn you and darn you"
140 #~ msgid "You fly on the wings of romance"
142 #~ "Die Flügel der \n"
143 #~ "frischen Liebe \n"
144 #~ "heben dich zum \n"
148 #~ msgid "In the eyes of the world"
149 #~ msgstr "Für die anderen"
151 # Etwas freie Übersetzung.
152 #~ msgid "You're just another crazy girl"
154 #~ "bist du bloß ein \n"
155 #~ "verrücktes dummes \n"
158 #~ msgid "Who loves a married man"
161 #~ "verheirateten Mann \n"
166 ${DIFF} mfi-test5.ok mfi-test5.out