X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fskip.inc;h=268edf16d1e96d49ff18836d080c92f0db0e0f99;hp=f273c91068d2cb8d0c8942c95fa032c90fe12c10;hb=96d059e9210a6677427392d615bc42ab38b3b432;hpb=5f7061a515a21abec1cf742f25a68967516e21cb diff --git a/tests/skip.inc b/tests/skip.inc index f273c91..268edf1 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -3,7 +3,8 @@ defined('STDOUT') or define('STDOUT', fopen('php://stdout', 'w')); function skipif($if, $skip) { if ($if) { fprintf(STDOUT, "skip $skip"); exit(); }} function checkcgi() { skipif(!strncasecmp('CLI', PHP_SAPI, 3), 'need CGI SAPI'); } function checkext($ext) { skipif(!extension_loaded($ext), "need ext/$ext"); } -function checkver($ver) { skipif(round($ver,1) > round((double) PHP_VERSION,1), "need PHP v$ver"); } +function checkmin($ver) { skipif(round($ver,1) > round((double) PHP_VERSION,1), sprintf("need PHP >= v%0.1f",$ver)); } +function checkmax($ver) { skipif(round($ver,1) < round((double) PHP_VERSION,1), sprintf("need PHP <= v%0.1f",$ver)); } function checkurl($url) { skipif(!@fsockopen($url, 80), "$url not responsive"); } function checkcls($cls) { skipif(!class_exists($cls), "need class $cls"); } checkext('http');