~ubuntu-branches/ubuntu/lucid/spamassassin/lucid-proposed

« back to all changes in this revision

Viewing changes to t/recursion.t

  • Committer: Bazaar Package Importer
  • Author(s): Laurent Bigonville, Ubuntu Merge-o-Matic, Laurent Bigonville
  • Date: 2006-07-31 15:40:08 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060731154008-j37ulp5pgfkddegw
Tags: 3.1.3-1ubuntu1
[ Ubuntu Merge-o-Matic ]
* Merge from debian unstable.

[ Laurent Bigonville ]
* fix debian/control.
* drop debian/patches/40_fix_dns_issue.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
use lib '.'; use lib 't';
4
4
use SATest; sa_t_init("recursion");
5
 
use Test; BEGIN { plan tests => 7 };
 
5
use Test; BEGIN { plan tests => 10 };
6
6
use IO::File;
7
7
 
8
8
# ---------------------------------------------------------------------------
86
86
  close OUT or die;
87
87
}
88
88
 
 
89
sub create_test_message_3 {
 
90
  my $boundstr = "AAAAAAAAAAAAAAAAAAA";
 
91
  my $bound = $boundstr; $boundstr++;
 
92
  my $text = q{From: foo
 
93
Message-Id: <bar>
 
94
To: baz
 
95
Subject: testing recursion 2
 
96
};
 
97
 
 
98
  for my $i (1 .. 600) {
 
99
      $text .= qq{Content-Type: multipart/mixed; boundary="$boundstr"
 
100
 
 
101
--$boundstr
 
102
};
 
103
    $boundstr++;
 
104
  }
 
105
 
 
106
  open (OUT, ">log/recurse.eml") or die;
 
107
  print OUT $text;
 
108
  close OUT or die;
 
109
}
 
110
 
89
111
sub try_scan {
90
112
  my $fh = IO::File->new_tmpfile();
91
113
  ok($fh);
109
131
try_scan();
110
132
create_test_message($msg2);
111
133
try_scan();
 
134
create_test_message_3();
 
135
try_scan();
112
136
 
113
137
ok(unlink 'log/recurse.eml');