]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/lei_mail_sync.t
lei_mail_sync: Maildir canonicalization omits trailing slash
[public-inbox.git] / t / lei_mail_sync.t
index 864d6e48f48d4dafefaf7dab94e39ab899c8f864..f0605092fa6e70f40b187e36d269f0e245d3a6b5 100644 (file)
@@ -37,6 +37,18 @@ is_deeply($ro->locations_for('deadbeef'),
        { $imap => [ 1 ], $maildir => [ $fname ] },
        'locations_for w/ maildir + imap');
 
+if ('mess things up pretend old bug') {
+       $lms->lms_begin;
+       $lms->{dbh}->do('UPDATE folders SET loc = ? WHERE loc = ?', undef,
+                       "$maildir/", $maildir);
+       ok(delete $lms->{fmap}, 'clear folder map');
+       $lms->lms_commit;
+
+       $lms->lms_begin;
+       ok($lms->set_src('deadbeef', $maildir, \$fname), 'set Maildir once');
+       $lms->lms_commit;
+};
+
 is_deeply([sort($ro->folders)], [$imap, $maildir], 'both folders shown');
 my @res;
 $ro->each_src($maildir, sub {