cvs commit: qpsmtpd/t addresses.t qpsmtpd-address.t

[email protected] (Ask "Bj?rn" Hansen)
Newsgroups perl.cvs.qpsmtpd
Message-ID <[email protected]>
cvsuser     04/09/14 12:34:19

  Modified:    t        addresses.t qpsmtpd-address.t
  Log:
  add tests for single character domains
  
  Revision  Changes    Path
  1.2       +9 -0      qpsmtpd/t/addresses.t
  
  Index: addresses.t
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/t/addresses.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- addresses.t	16 Jul 2004 02:22:27 -0000	1.1
  +++ addresses.t	14 Sep 2004 19:34:19 -0000	1.2
  @@ -19,3 +19,12 @@
   is(($smtpd->command($command))[0], 250, $command);
   is($smtpd->transaction->sender->format, '<[email protected]>', 'got the right sender');
   
  +my $command = 'MAIL FROM:<>';
  +is(($smtpd->command($command))[0], 250, $command);
  +is($smtpd->transaction->sender->format, '<>', 'got the right sender');
  +
  +my $command = 'MAIL FROM:<[email protected]> SIZE=1230';
  +is(($smtpd->command($command))[0], 250, $command);
  +is($smtpd->transaction->sender->format, '<[email protected]>', 'got the right sender');
  +
  +
  
  
  
  1.5       +11 -2     qpsmtpd/t/qpsmtpd-address.t
  
  Index: qpsmtpd-address.t
  ===================================================================
  RCS file: /cvs/public/qpsmtpd/t/qpsmtpd-address.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -r1.4 -r1.5
  --- qpsmtpd-address.t	5 Sep 2004 16:32:35 -0000	1.4
  +++ qpsmtpd-address.t	14 Sep 2004 19:34:19 -0000	1.5
  @@ -1,8 +1,8 @@
   #!/usr/bin/perl
   use strict;
  -use warnings;
  +$^W = 1;
   
  -use Test::More tests => 20;
  +use Test::More tests => 24;
   
   BEGIN {
       use_ok('Qpsmtpd::Address');
  @@ -63,6 +63,15 @@
   ok ($ao, "new $as");
   is ($ao->address, '[email protected]', "address $as");
   
  +$as = '<[email protected]>';
  +$ao = Qpsmtpd::Address->new($as);
  +ok ($ao, "new $as");
  +is ($ao->format, $as, "format $as");
  +
  +$as = '[email protected]';
  +ok ($ao = Qpsmtpd::Address->parse($as), "parse $as");
  +is ($ao && $ao->address, $as, "address $as");
  +
   # Not sure why we can change the address like this, but we can so test it ...
   is ($ao->address('[email protected]'), '[email protected]', 'address([email protected])');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.