commit 9a0e65f89927970404d1aa44ecef72b818a95a2b
parent 0a684bd933f2f088f46b2d207494c964e91e2702
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date: Sun, 3 Nov 2013 20:20:08 +0100
create unseen messages in /new/
seen messages still go to /cur/.
this is consistent with the actual maildir driver.
Diffstat:
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/src/run-tests.pl b/src/run-tests.pl
@@ -177,7 +177,7 @@ test("slave max size", \@x20, \@X22);
my @x30 = (
[ 0,
- 1, 0, "F", 2, 0, "", 3, 0, "", 4, 0, "", 5, 0, "" ],
+ 1, 0, "F", 2, 0, "S", 3, 0, "S", 4, 0, "", 5, 0, "" ],
[ 0,
],
[ 0, 0, 0,
@@ -188,11 +188,11 @@ my @x30 = (
my @X31 = (
[ "", "", "MaxMessages 3\n" ],
[ 5,
- 1, 1, "F", 2, 2, "", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 2, 2, "S", 3, 3, "S", 4, 4, "", 5, 5, "" ],
[ 5,
- 1, 1, "F", 2, 2, "", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 2, 2, "S", 3, 3, "S", 4, 4, "", 5, 5, "" ],
[ 5, 0, 0,
- 1, 1, "F", 2, 2, "", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 2, 2, "S", 3, 3, "S", 4, 4, "", 5, 5, "" ],
);
test("max messages", \@x30, \@X31);
@@ -202,32 +202,32 @@ my @x40 = @X31[1,2,3];
my @X41 = (
[ "", "", "MaxMessages 3\nExpunge Both\n" ],
[ 5,
- 1, 1, "F", 2, 2, "", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 2, 2, "S", 3, 3, "S", 4, 4, "", 5, 5, "" ],
[ 5,
- 1, 1, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 3, 3, "S", 4, 4, "", 5, 5, "" ],
[ 5, 2, 0,
- 1, 1, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "F", 3, 3, "S", 4, 4, "", 5, 5, "" ],
);
test("max messages catch-up", \@x40, \@X41);
my @x50 = (
[ 5,
- 1, 1, "F", 2, 2, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "FS", 2, 2, "FS", 3, 3, "", 4, 4, "", 5, 5, "" ],
[ 5,
- 1, 1, " ", 2, 2, "T", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "S", 2, 2, "ST", 3, 3, "", 4, 4, "", 5, 5, "" ],
[ 5, 2, 0,
- 1, 1, "F", 2, 2, "X", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "FS", 2, 2, "XS", 3, 3, "", 4, 4, "", 5, 5, "" ],
);
#show("50", "51", "", "", "MaxMessages 3\nExpunge Both\n");
my @X51 = (
[ "", "", "MaxMessages 3\nExpunge Both\n" ],
[ 5,
- 1, 1, "", 2, 2, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 1, 1, "S", 2, 2, "FS", 3, 3, "", 4, 4, "", 5, 5, "" ],
[ 5,
- 2, 2, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 2, 2, "FS", 3, 3, "", 4, 4, "", 5, 5, "" ],
[ 5, 2, 0,
- 2, 2, "F", 3, 3, "", 4, 4, "", 5, 5, "" ],
+ 2, 2, "FS", 3, 3, "", 4, 4, "", 5, 5, "" ],
);
test("max messages + expire", \@x50, \@X51);
@@ -441,7 +441,7 @@ sub mkbox($$@)
$uid = "";
}
my $big = $flg =~ s/\*//;
- open(FILE, ">", $bn."/cur/0.1_".$num.".local".$uid.":2,".$flg) or
+ open(FILE, ">", $bn."/".($flg =~ /S/ ? "cur" : "new")."/0.1_".$num.".local".$uid.":2,".$flg) or
die "Cannot create message $num in mailbox $bn.\n";
print FILE "From: foo\nTo: bar\nDate: Thu, 1 Jan 1970 00:00:00 +0000\nSubject: $num\n\n".(("A"x50)."\n")x($big*30);
close FILE;