Mercurial > hg > nginx-tests
comparison ssl_ocsp.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 | c924ae8d7104 |
children |
comparison
equal
deleted
inserted
replaced
1994:e9235c647f45 | 1995:d329b05e20fa |
---|---|
407 | 407 |
408 like(get('root', port => 8447), qr/200 OK.*SUCCESS/s, 'ocsp one'); | 408 like(get('root', port => 8447), qr/200 OK.*SUCCESS/s, 'ocsp one'); |
409 | 409 |
410 # check for errors | 410 # check for errors |
411 | 411 |
412 like(`grep -F '[crit]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no crit'); | 412 is($t->grep_file('error.log', '[crit]'), '', 'no crit'); |
413 | 413 |
414 ############################################################################### | 414 ############################################################################### |
415 | 415 |
416 sub get { | 416 sub get { |
417 my $s = get_socket(@_) || return; | 417 my $s = get_socket(@_) || return; |