comparison grpc_request_buffering.t @ 1995:d329b05e20fa

Tests: removed usage of "cat" and "grep" in tests. Both "cat" and "grep" might not be available on Windows. Instead, $t->read_file() is used, as it is already used in other places. To simplify checking logs as previously done with "grep", $t->grep_file() helper function is introduced.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 09 Aug 2024 05:18:51 +0300
parents 11463d379570
children
comparison
equal deleted inserted replaced
1994:e9235c647f45 1995:d329b05e20fa
103 103
104 $frames = $f->{http_end}(); 104 $frames = $f->{http_end}();
105 is(eval(join '+', map { $_->{length} } grep { $_->{type} eq "DATA" } @$frames), 105 is(eval(join '+', map { $_->{length} } grep { $_->{type} eq "DATA" } @$frames),
106 465, 'preserve_output - last body bytes'); 106 465, 'preserve_output - last body bytes');
107 107
108 like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crits'); 108 is($t->grep_file('error.log', '[crit]'), '', 'no crit');
109 109
110 ############################################################################### 110 ###############################################################################
111 111
112 sub grpc { 112 sub grpc {
113 my ($server, $client, $f, $s, $c, $sid, $uri); 113 my ($server, $client, $f, $s, $c, $sid, $uri);