From: Bruno Haible Date: Fri, 21 Dec 2001 18:29:53 +0000 (+0000) Subject: HP-UX portability. X-Git-Tag: v0.11~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=427f2c17087ca21f48435083b01e83203824a336;p=thirdparty%2Fgettext.git HP-UX portability. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index ae894a7a3..a478edf31 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2001-12-21 Bruno Haible + + * msgfilter-1: Avoid failure on HP-UX, due to strange 'fold' program. + 2001-12-20 Bruno Haible * lang-c: Pass --mode argument to libtool. diff --git a/tests/msgfilter-1 b/tests/msgfilter-1 index b61d25cfc..0746a47db 100755 --- a/tests/msgfilter-1 +++ b/tests/msgfilter-1 @@ -5,9 +5,26 @@ tmpfiles="" trap 'rm -fr $tmpfiles' 1 2 3 15 +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + # Some fold programs (like SunOS4) don't have an option to wrap at spaces. echo abc | fold -b -s -w 20 >/dev/null 2>&1 || { echo "SKIP: msgfilter-1"; 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` +test "$foldoutputcount" = 3 || { echo "SKIP: msgfilter-1"; rm -fr $tmpfiles; exit 77; } + tmpfiles="$tmpfiles mfi-test1.po" cat < mfi-test1.po # HEADER.