Skip to content

Commit

Permalink
Print empty string in test for but 77390 just once
Browse files Browse the repository at this point in the history
  • Loading branch information
bukka committed Feb 24, 2019
1 parent c814b34 commit 01c0095
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ext/openssl/tests/bug77390.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down Expand Up @@ -123,5 +127,4 @@ ServerClientTestCase::getInstance()->run($clientCode, [
?>
--EXPECT--
string(0) ""
string(0) ""
string(12) "hello, world"

0 comments on commit 01c0095

Please sign in to comment.