X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fskip.inc;h=d8770fb1fda6f405e690ddd3ab22f489a6352c06;hb=e97eb4951a19e934d25e9c5c2f147f4b009bbdfe;hp=5665d5dddd141f65563b86bfea15a3911cdae10e;hpb=e6d36989f0650bf097b6909c41cdd20a1ffcd6af;p=m6w6%2Fext-http diff --git a/tests/skip.inc b/tests/skip.inc index 5665d5d..d8770fb 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -1,10 +1,13 @@ 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 checkmin($ver) { skipif(version_compare(PHP_VERSION, $ver) < 0, sprintf("need PHP >= v%s",$ver)); } +function checkmax($ver) { skipif(version_compare(PHP_VERSION, $ver) > 0, sprintf("need PHP <= v%s",$ver)); } function checkurl($url) { skipif(!@fsockopen($url, 80), "$url not responsive"); } function checkcls($cls) { skipif(!class_exists($cls), "need class $cls"); } function checkver($ver) { checkmin($ver); }