X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fskipif.inc;h=4844defba0ad07ea61918f1aa4c023d1ed9a95d5;hp=cceeaf077e82820daeea9e84423986ac1524177a;hb=refs%2Fheads%2Fv2.6.x;hpb=7b3c686de9ef70f2124136b5a1b8dffa7602a4d7 diff --git a/tests/skipif.inc b/tests/skipif.inc index cceeaf0..4844def 100644 --- a/tests/skipif.inc +++ b/tests/skipif.inc @@ -20,11 +20,17 @@ function skip_client_test($message = "skip need a client driver\n") { } } -function skip_http2_test($message = "skip need http2 support (nghttpd in PATH)\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"); + } + if (!(http\Client\Curl\FEATURES & http\Client\Curl\Features\HTTP2)) { + die("$message (FEATURES & HTTP2)\n"); + } foreach (explode(":", $_ENV["PATH"]) as $path) { if (is_executable($path . "/nghttpd")) { return; } } - die($message); + die("$message (nghttpd in PATH)\n"); } \ No newline at end of file