File: 16newdefault.t

package info (click to toggle)
libemail-foldertype-perl 0.812-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 144 kB
  • ctags: 14
  • sloc: perl: 63; makefile: 39
file content (27 lines) | stat: -rw-r--r-- 561 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use Test::More tests => 4;

use_ok('Email::FolderType',qw(folder_type));
use Email::FolderType::Mbox;

BEGIN { $^W = 0; }

my $package = "Email::FolderType";

${"$package\::DEFAULT"}     = 'TestMatcher';

is(folder_type('t/this_is_a_test_matcher'), 'TestMatcher', 'new TestMatcher works');
is(folder_type('t/testmh/.'), 'MH', 'MH still works');
is(folder_type('t/testmbox'), 'Mbox', 'Mbox still works');

package Email::FolderType::Mbox;

sub match { return (defined $_[0] && -f $_[0]) }

package Email::FolderType::TestMatcher;

sub match { return 1; }




1;