X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fskipif.inc;h=4844defba0ad07ea61918f1aa4c023d1ed9a95d5;hb=b41323e1817c50d062b27da798c7db35fa58212c;hp=cceeaf077e82820daeea9e84423986ac1524177a;hpb=95c6c900d04096d332c422e3f597186b7184c5ab;p=m6w6%2Fext-http 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