diff options
author | Bruno Haible <bruno@clisp.org> | 2001-12-21 18:29:53 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-22 00:28:56 +0200 |
commit | 427f2c17087ca21f48435083b01e83203824a336 (patch) | |
tree | 4d3f5f855a42b3fa12425240e97cb5c992706f4b | |
parent | 29e3591a519e71ede582c12c19ecb05498ffd18c (diff) | |
download | external_gettext-427f2c17087ca21f48435083b01e83203824a336.zip external_gettext-427f2c17087ca21f48435083b01e83203824a336.tar.gz external_gettext-427f2c17087ca21f48435083b01e83203824a336.tar.bz2 |
HP-UX portability.
-rw-r--r-- | tests/ChangeLog | 4 | ||||
-rwxr-xr-x | tests/msgfilter-1 | 17 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog index ae894a7..a478edf 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2001-12-21 Bruno Haible <bruno@clisp.org> + + * msgfilter-1: Avoid failure on HP-UX, due to strange 'fold' program. + 2001-12-20 Bruno Haible <bruno@clisp.org> * lang-c: Pass --mode argument to libtool. diff --git a/tests/msgfilter-1 b/tests/msgfilter-1 index b61d25c..0746a47 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 <<EOF > mfi-test1.po # HEADER. |