]> granicus.if.org Git - php/commitdiff
Print empty string in test for but 77390 just once
authorJakub Zelenka <bukka@php.net>
Sun, 24 Feb 2019 13:11:27 +0000 (13:11 +0000)
committerJakub Zelenka <bukka@php.net>
Sun, 24 Feb 2019 13:11:27 +0000 (13:11 +0000)
ext/openssl/tests/bug77390.phpt

index 2aa2b15b41bb7a3bcb2653d78d680ce7e5c78a0b..99ba43e50b68d55ebd0da47be77e9952d76b2509 100644 (file)
@@ -23,6 +23,7 @@ $clientCode = <<<'CODE'
 
     $read = [$fp];
     $buf = '';
+    $emptyChunkPrinted = false;
     $warmedUp = false;
     while (stream_select($read, $write, $except, 1000)) {
         $chunk = stream_get_contents($fp, 4096);
@@ -37,7 +38,10 @@ $clientCode = <<<'CODE'
             phpt_notify('server');
             continue;
         }
-        var_dump($chunk);
+        if ($chunk !== '' || !$emptyChunkPrinted) {
+            $emptyChunkPrinted = true;
+            var_dump($chunk);
+        }
         if ($buf === 'hello, world') {
             break;
         }
@@ -123,5 +127,4 @@ ServerClientTestCase::getInstance()->run($clientCode, [
 ?>
 --EXPECT--
 string(0) ""
-string(0) ""
 string(12) "hello, world"