3 # Test general filter execution.
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
9 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
10 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
20 # Some fold programs (like SunOS4 and FreeBSD) don't have an option to wrap at
22 echo abc | fold -b -s -w 20 >/dev/null 2>&1 || {
23 echo "Skipping test: fold program not POSIX compliant"
24 rm -fr $tmpfiles; exit 77
27 # Some fold programs (like NetBSD 5.0) remove trailing spaces when wrapping.
28 echo ab cd | fold -b -s -w 3 | grep ' ' >/dev/null || {
29 echo "Skipping test: fold program trims trailing spaces"
30 rm -fr $tmpfiles; exit 77
33 # Some fold programs (like HP-UX) insert a newline at the end, if the last
34 # line was not terminated with a newline and the -s option was given.
35 foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c`
36 foldoutputcount=`echo "$foldoutputcount" | sed -e 's/[ ]//g'`
37 test "$foldoutputcount" = 3 || {
38 echo "Skipping test: fold program inserts extra newline"
39 rm -fr $tmpfiles; exit 77
42 tmpfiles="$tmpfiles mfi-test1.po"
43 cat <<\EOF > mfi-test1.po
48 "Project-Id-Version: Bonnie Tyler\n"
49 "Content-Type: text/plain; charset=ISO-8859-1\n"
50 "Content-Transfer-Encoding: 8bit\n"
54 msgid "The world is full of married men"
55 msgstr "So viele verheiratete Männer"
58 msgid "with wives who never understand"
59 msgstr "und ihre Frauen verstehen sie nicht"
62 msgid "They're looking for someone to share"
65 # schwer zu übersetzen...
67 msgid "the excitement of a love affair"
71 msgid "Just as soon as they find you"
75 msgid "They warn you and darn you"
78 #~ msgid "You fly on the wings of romance"
79 #~ msgstr "Die Flügel der frischen Liebe heben dich zum Himmel"
82 #~ msgid "In the eyes of the world"
83 #~ msgstr "Für die anderen"
85 # Etwas freie Übersetzung.
86 #~ msgid "You're just another crazy girl"
87 #~ msgstr "bist du bloß ein verrücktes dummes Ding"
89 #~ msgid "Who loves a married man"
90 #~ msgstr "das einen verheirateten Mann liebt"
93 tmpfiles="$tmpfiles mfi-test1.out mfi-test1.err"
94 : ${MSGFILTER=msgfilter}
96 ${MSGFILTER} -i mfi-test1.po -o mfi-test1.out fold -b -s -w 20 >mfi-test1.err 2>&1
98 cat mfi-test1.err | grep -v 'warning: Locale charset' | grep -v '^ '
99 test $result = 0 || { rm -fr $tmpfiles; exit 1; }
101 tmpfiles="$tmpfiles mfi-test1.ok"
102 cat <<\EOF > mfi-test1.ok
107 "Project-Id-Version: \n"
111 "charset=ISO-8859-1\n"
112 "Content-Transfer-Enc\n"
117 msgid "The world is full of married men"
120 "verheiratete Männer"
123 msgid "with wives who never understand"
126 "verstehen sie nicht"
129 msgid "They're looking for someone to share"
132 # schwer zu übersetzen...
134 msgid "the excitement of a love affair"
138 msgid "Just as soon as they find you"
142 msgid "They warn you and darn you"
145 #~ msgid "You fly on the wings of romance"
147 #~ "Die Flügel der \n"
148 #~ "frischen Liebe \n"
149 #~ "heben dich zum \n"
153 #~ msgid "In the eyes of the world"
154 #~ msgstr "Für die anderen"
156 # Etwas freie Übersetzung.
157 #~ msgid "You're just another crazy girl"
159 #~ "bist du bloß ein \n"
160 #~ "verrücktes dummes \n"
163 #~ msgid "Who loves a married man"
166 #~ "verheirateten Mann \n"
171 ${DIFF} mfi-test1.ok mfi-test1.out