X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fskip.inc;h=63ae05cff423c3f4f13a78d403a6a18d92966f4a;hb=e29a410679b63b8f96b6890d1418f39d9ed489cc;hp=f273c91068d2cb8d0c8942c95fa032c90fe12c10;hpb=1d37eec22d2a073acd8785431621c26c2312a246;p=m6w6%2Fext-http diff --git a/tests/skip.inc b/tests/skip.inc index f273c91..63ae05c 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -1,10 +1,15 @@ 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"); } +function checkver($ver) { checkmin($ver); } checkext('http'); ?>