Mercurial > hg > nginx-tests
diff ssl_session_reuse.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 | ab45ee8011df |
children |
line wrap: on
line diff
--- a/ssl_session_reuse.t +++ b/ssl_session_reuse.t @@ -195,7 +195,7 @@ is(test_reuse(8449), 0, 'cache off not r $t->stop(); -like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit'); +is($t->grep_file('error.log', '[crit]'), '', 'no crit'); ###############################################################################