diff options
author | dakkar <dakkar@luxion> | 2007-12-27 14:36:45 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2007-12-27 14:36:45 +0000 |
commit | f67531bad2b0aaebfea7ec63922290f28e86d6ab (patch) | |
tree | c5650db6cef8af570767ccb00bfacdf422a49632 /t/02-input.t | |
parent | r3302@rfc-1918: dakkar | 2007-12-27 13:18:56 +0100 (diff) | |
download | Graylister-f67531bad2b0aaebfea7ec63922290f28e86d6ab.tar.gz Graylister-f67531bad2b0aaebfea7ec63922290f28e86d6ab.tar.bz2 Graylister-f67531bad2b0aaebfea7ec63922290f28e86d6ab.zip |
r3304@rfc-1918: dakkar | 2007-12-27 13:19:58 +0100
prepraering fro branching
Diffstat (limited to 't/02-input.t')
-rw-r--r-- | t/02-input.t | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/t/02-input.t b/t/02-input.t new file mode 100644 index 0000000..3013798 --- /dev/null +++ b/t/02-input.t @@ -0,0 +1,19 @@ +# -*- mode: cperl -*- +use Test::More tests=>2; +use File::Temp 'tempdir'; +use DAKKAR::Graylister; + +my $dbdir=tempdir(CLEANUP=>1); + +local $ENV{SMTPMAILFROM}='gino'; +local $ENV{SMTPRCPTTO}='pino'; +local $ENV{TCPREMOTEIP}='10.1.2.3'; +local $ENV{DAKGL_DBNAME}="$dbdir/gray1.db"; +is_deeply([DAKKAR::Graylister::get_from_env()], + ['10.1.2.3','gino','pino'], + 'from env'); +$ENV{SMTPMAILFROM}='gino-return-12-@pino.it'; +is_deeply([DAKKAR::Graylister::get_from_env()], + ['10.1.2.3','gino-return-$-@pino.it','pino'], + 'from env, ezmlm'); + |