X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fskip.inc;h=d8770fb1fda6f405e690ddd3ab22f489a6352c06;hb=6df516595ca42f9b2bdcbb52c863c430fae450d4;hp=268edf16d1e96d49ff18836d080c92f0db0e0f99;hpb=96d059e9210a6677427392d615bc42ab38b3b432;p=m6w6%2Fext-http diff --git a/tests/skip.inc b/tests/skip.inc index 268edf1..d8770fb 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -1,11 +1,15 @@ 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); } checkext('http'); ?>