X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fskipif.inc;h=76c3bd793576f73639a62860629055f7c79c6367;hp=4844defba0ad07ea61918f1aa4c023d1ed9a95d5;hb=a4f66fb42bb5203e9d1897a6cf554aa702ce0380;hpb=1eaeb2c133a2e47327fe6cd6282db2a02527e57a diff --git a/tests/skipif.inc b/tests/skipif.inc index 4844def..76c3bd7 100644 --- a/tests/skipif.inc +++ b/tests/skipif.inc @@ -1,7 +1,27 @@ =")) { + die("skip need at least libcurl version $version\n"); + } +} + function skip_http2_test($message = "skip need http2 support") { if (!defined("http\\Client\\Curl\\HTTP_VERSION_2_0")) { die("$message (HTTP_VERSION_2_0)\n"); @@ -27,10 +53,10 @@ function skip_http2_test($message = "skip need http2 support") { if (!(http\Client\Curl\FEATURES & http\Client\Curl\Features\HTTP2)) { die("$message (FEATURES & HTTP2)\n"); } - foreach (explode(":", $_ENV["PATH"]) as $path) { + foreach (explode(":", getenv("PATH")) as $path) { if (is_executable($path . "/nghttpd")) { return; } } die("$message (nghttpd in PATH)\n"); -} \ No newline at end of file +}