mirror of
https://github.com/imapsync/imapsync.git
synced 2025-08-05 16:28:04 +02:00
1.267
This commit is contained in:
parent
c09ef20a65
commit
36bfe4238a
46 changed files with 30656 additions and 73 deletions
32
Mail-IMAPClient-3.10/t/messageset.t
Executable file
32
Mail-IMAPClient-3.10/t/messageset.t
Executable file
|
@ -0,0 +1,32 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
|
||||
use Test::More tests => 7;
|
||||
|
||||
use_ok('Mail::IMAPClient::MessageSet');
|
||||
|
||||
my $one = q/1:4,3:6,10:15,20:25,2:8/;
|
||||
my $range = Mail::IMAPClient::MessageSet->new($one);
|
||||
is($range, "1:8,10:15,20:25", 'range simplify');
|
||||
|
||||
is( join(",",$range->unfold)
|
||||
, "1,2,3,4,5,6,7,8,10,11,12,13,14,15,20,21,22,23,24,25"
|
||||
, 'range unfold');
|
||||
|
||||
$range .= "30,31,32,31:34,40:44";
|
||||
is($range, "1:8,10:15,20:25,30:34,40:44", 'overload concat');
|
||||
|
||||
is( join(",",$range->unfold)
|
||||
, "1,2,3,4,5,6,7,8,10,11,12,13,14,15,20,21,22,23,24,25,"
|
||||
. "30,31,32,33,34,40,41,42,43,44"
|
||||
, 'unfold extended');
|
||||
|
||||
$range -= "1:2";
|
||||
is($range, "3:8,10:15,20:25,30:34,40:44", 'overload subtract');
|
||||
|
||||
is( join(",",$range->unfold)
|
||||
, "3,4,5,6,7,8,10,11,12,13,14,15,20,21,22,23,24,25,"
|
||||
. "30,31,32,33,34,40,41,42,43,44"
|
||||
, 'subtract unfold');
|
Loading…
Add table
Add a link
Reference in a new issue