X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fskip.inc;h=d8770fb1fda6f405e690ddd3ab22f489a6352c06;hp=f273c91068d2cb8d0c8942c95fa032c90fe12c10;hb=d7ce6cca59bb57636f075048fc3ff48038c3e45e;hpb=1d37eec22d2a073acd8785431621c26c2312a246 diff --git a/tests/skip.inc b/tests/skip.inc index f273c91..d8770fb 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(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'); ?>