From: Bruno Haible Date: Wed, 26 May 2010 10:00:09 +0000 (+0200) Subject: Avoid test suite failures on NetBSD 5.0. X-Git-Tag: v0.18.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c04c5bc3eceb860c1759cb130123351eca308a49;p=thirdparty%2Fgettext.git Avoid test suite failures on NetBSD 5.0. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index 71df3d2c6..fcfca1958 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,10 @@ +2010-05-26 Bruno Haible + + Avoid test suite failures on NetBSD 5.0. + * msgfilter-1: Skip the test if the 'fold' program trims trailing + spaces. + * msgfilter-3: Likewise. + 2010-05-23 Bruno Haible msggrep: Fix interpretation of '$' in regular expressions. diff --git a/gettext-tools/tests/msgfilter-1 b/gettext-tools/tests/msgfilter-1 index ec0d2019f..6241e4418 100755 --- a/gettext-tools/tests/msgfilter-1 +++ b/gettext-tools/tests/msgfilter-1 @@ -24,6 +24,12 @@ echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { rm -fr $tmpfiles; exit 77 } +# Some fold programs (like NetBSD 5.0) remove trailing spaces when wrapping. +echo ab cd | fold -b -s -w 3 | grep ' ' >/dev/null || { + echo "Skipping test: fold program trims trailing spaces" + rm -fr $tmpfiles; exit 77 +} + # Some fold programs (like HP-UX) insert a newline at the end, if the last # line was not terminated with a newline and the -s option was given. foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c` diff --git a/gettext-tools/tests/msgfilter-3 b/gettext-tools/tests/msgfilter-3 index 546f85595..e36df42c5 100755 --- a/gettext-tools/tests/msgfilter-3 +++ b/gettext-tools/tests/msgfilter-3 @@ -24,6 +24,12 @@ echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { rm -fr $tmpfiles; exit 77 } +# Some fold programs (like NetBSD 5.0) remove trailing spaces when wrapping. +echo ab cd | fold -b -s -w 3 | grep ' ' >/dev/null || { + echo "Skipping test: fold program trims trailing spaces" + rm -fr $tmpfiles; exit 77 +} + # Some fold programs (like HP-UX) insert a newline at the end, if the last # line was not terminated with a newline and the -s option was given. foldoutputcount=`echo $ac_n "abc$ac_c" | fold -b -s -w 20 | wc -c`