comparison smtp-greeting-delay.t @ 27:fb94a224fef2

Tests: add has() functions for feature testing. Currently it just skips all tests if feature not found in nginx -V output.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 10 Oct 2008 20:09:14 +0400
parents 0880e0fafde4
children 8f1519472ece
comparison
equal deleted inserted replaced
26:0880e0fafde4 27:fb94a224fef2
5 ############################################################################### 5 ###############################################################################
6 6
7 use warnings; 7 use warnings;
8 use strict; 8 use strict;
9 9
10 use Test::More tests => 2; 10 use Test::More;
11 11
12 use MIME::Base64; 12 use MIME::Base64;
13 use Socket qw/ CRLF /; 13 use Socket qw/ CRLF /;
14 14
15 BEGIN { use FindBin; chdir($FindBin::Bin); } 15 BEGIN { use FindBin; chdir($FindBin::Bin); }
21 ############################################################################### 21 ###############################################################################
22 22
23 select STDERR; $| = 1; 23 select STDERR; $| = 1;
24 select STDOUT; $| = 1; 24 select STDOUT; $| = 1;
25 25
26 my $t = Test::Nginx->new()->write_file_expand('nginx.conf', <<'EOF')->run(); 26 my $t = Test::Nginx->new()->has('mail', plan => 2)
27 ->write_file_expand('nginx.conf', <<'EOF')->run();
27 28
28 master_process off; 29 master_process off;
29 daemon off; 30 daemon off;
30 31
31 events { 32 events {