diff proxy_keepalive.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 882267679006
children
line wrap: on
line diff
--- a/proxy_keepalive.t
+++ b/proxy_keepalive.t
@@ -208,7 +208,7 @@ like(http_get('/inmemory/closed2'), qr/2
 
 # check for errors, shouldn't be any
 
-like(`grep -F '[error]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no errors');
+is($t->grep_file('error.log', '[error]'), '', 'no errors');
 
 ###############################################################################