about summary refs log tree commit homepage
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-08-31 11:21:24 +0000
committerEric Wong <e@80x24.org>2021-08-31 11:29:12 +0000
commit4853dee600d76ed5de5807605fa78bcd0557babd (patch)
treedfc51894dc4098e699db0b93b65f16b5bc42b028 /t
parent67bbb44851c45ca727a8a1112b01408195f66442 (diff)
downloadpublic-inbox-4853dee600d76ed5de5807605fa78bcd0557babd.tar.gz
Another step towards moving more of our internals to use binary
OIDs to avoid needless conversions before hitting disk.
Diffstat (limited to 't')
-rw-r--r--t/lei_mail_sync.t15
1 files changed, 8 insertions, 7 deletions
diff --git a/t/lei_mail_sync.t b/t/lei_mail_sync.t
index a5e5f5d3..5daa49cd 100644
--- a/t/lei_mail_sync.t
+++ b/t/lei_mail_sync.t
@@ -16,24 +16,25 @@ is_deeply([$ro->folders], [], 'no folders, yet');
 
 my $imap = 'imaps://bob@[::1]/INBOX;UIDVALIDITY=9';
 $lms->lms_begin;
-is($lms->set_src('deadbeef', $imap, 1), 1, 'set IMAP once');
-ok($lms->set_src('deadbeef', $imap, 1) == 0, 'set IMAP idempotently');
+my $deadbeef = "\xde\xad\xbe\xef";
+is($lms->set_src($deadbeef, $imap, 1), 1, 'set IMAP once');
+ok($lms->set_src($deadbeef, $imap, 1) == 0, 'set IMAP idempotently');
 $lms->lms_commit;
 is_deeply([$ro->folders], [$imap], 'IMAP folder added');
 is_deeply([$ro->folders($imap)], [$imap], 'IMAP folder with full GLOB');
 is_deeply([$ro->folders('imaps://bob@[::1]/INBOX')], [$imap],
                 'IMAP folder with partial GLOB');
 
-is_deeply($ro->locations_for("\xde\xad\xbe\xef"),
+is_deeply($ro->locations_for($deadbeef),
         { $imap => [ 1 ] }, 'locations_for w/ imap');
 
 my $maildir = 'maildir:/home/user/md';
 my $fname = 'foo:2,S';
 $lms->lms_begin;
-ok($lms->set_src('deadbeef', $maildir, \$fname), 'set Maildir once');
-ok($lms->set_src('deadbeef', $maildir, \$fname) == 0, 'set Maildir again');
+ok($lms->set_src($deadbeef, $maildir, \$fname), 'set Maildir once');
+ok($lms->set_src($deadbeef, $maildir, \$fname) == 0, 'set Maildir again');
 $lms->lms_commit;
-is_deeply($ro->locations_for("\xde\xad\xbe\xef"),
+is_deeply($ro->locations_for($deadbeef),
         { $imap => [ 1 ], $maildir => [ $fname ] },
         'locations_for w/ maildir + imap');
 
@@ -45,7 +46,7 @@ if ('mess things up pretend old bug') {
         $lms->lms_commit;
 
         $lms->lms_begin;
-        ok($lms->set_src('deadbeef', $maildir, \$fname), 'set Maildir once');
+        ok($lms->set_src($deadbeef, $maildir, \$fname), 'set Maildir once');
         $lms->lms_commit;
 };