diff options
author | Bruno Haible <bruno@clisp.org> | 2006-06-09 20:23:12 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:13:22 +0200 |
commit | c8ecdf93c75e0cd190c9db00de3bd67801c8f4cf (patch) | |
tree | a3d186d086627085bf4c8cfae249ab068e6bec45 | |
parent | b83b91e1eef5d017dde3b37f26c1e75ed9652f53 (diff) | |
download | external_gettext-c8ecdf93c75e0cd190c9db00de3bd67801c8f4cf.zip external_gettext-c8ecdf93c75e0cd190c9db00de3bd67801c8f4cf.tar.gz external_gettext-c8ecdf93c75e0cd190c9db00de3bd67801c8f4cf.tar.bz2 |
Fix version recognition.
-rw-r--r-- | gettext-tools/tests/ChangeLog | 4 | ||||
-rwxr-xr-x | gettext-tools/tests/lang-php | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f29f8fa..c3f5833 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,5 +1,9 @@ 2006-06-03 Bruno Haible <bruno@clisp.org> + * lang-php: Fix version recognition for PHP 4. + +2006-06-03 Bruno Haible <bruno@clisp.org> + Explain why tests are skipped. * Makefile.am (TESTS_ENVIRONMENT): Also define JAVA_CHOICE, BUILDJAVA, CSHARPCHOICE, BUILDCSHARP. diff --git a/gettext-tools/tests/lang-php b/gettext-tools/tests/lang-php index 987274c..a42f944 100755 --- a/gettext-tools/tests/lang-php +++ b/gettext-tools/tests/lang-php @@ -66,9 +66,12 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES ${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po # Test for presence of php version 4.0 or newer. -case `(php -v) 2>/dev/null` in +(php -v) >/dev/null 2>/dev/null +test $? -le 1 \ + || { echo "Skipping test: php not found"; rm -fr $tmpfiles; exit 77; } +case `php -v | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in [4-9].*) ;; - *) echo "Skipping test: php not found or too old"; rm -fr $tmpfiles; exit 77;; + *) echo "Skipping test: php version too old"; rm -fr $tmpfiles; exit 77;; esac # Test which of the fr_FR locales are installed. |