From 01c00953ff07b3b9414c446c6872b047b23afe24 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Sun, 24 Feb 2019 13:11:27 +0000 Subject: [PATCH] Print empty string in test for but 77390 just once --- ext/openssl/tests/bug77390.phpt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ext/openssl/tests/bug77390.phpt b/ext/openssl/tests/bug77390.phpt index 2aa2b15b41..99ba43e50b 100644 --- a/ext/openssl/tests/bug77390.phpt +++ b/ext/openssl/tests/bug77390.phpt @@ -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" -- 2.40.0