comparison smtp.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
7 ############################################################################### 7 ###############################################################################
8 8
9 use warnings; 9 use warnings;
10 use strict; 10 use strict;
11 11
12 use Test::More tests => 26; 12 use Test::More;
13 13
14 use MIME::Base64; 14 use MIME::Base64;
15 use Socket qw/ CRLF /; 15 use Socket qw/ CRLF /;
16 16
17 BEGIN { use FindBin; chdir($FindBin::Bin); } 17 BEGIN { use FindBin; chdir($FindBin::Bin); }
24 24
25 select STDERR; $| = 1; 25 select STDERR; $| = 1;
26 select STDOUT; $| = 1; 26 select STDOUT; $| = 1;
27 27
28 my $t = Test::Nginx->new() 28 my $t = Test::Nginx->new()
29 ->has('mail', plan => 26)
29 ->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon) 30 ->run_daemon(\&Test::Nginx::SMTP::smtp_test_daemon)
30 ->write_file_expand('nginx.conf', <<'EOF')->run(); 31 ->write_file_expand('nginx.conf', <<'EOF')->run();
31 32
32 master_process off; 33 master_process off;
33 daemon off; 34 daemon off;