test-mailbox-get.c revision a8c5a86d183db25a57bf193c06b41e092ec2e151
/* Copyright (c) 2009-2014 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "array.h"
#include "test-common.h"
#include "mail-index-modseq.h"
#include "mail-storage-private.h"
static unsigned int expunge_idx;
static unsigned int nonexternal_idx;
{
}
{
*first_seq_r = first_uid;
*last_seq_r = last_uid;
return TRUE;
}
{
return TRUE;
}
struct mail_transaction_log_view *
bool *reset_r ATTR_UNUSED) {
if (min_file_seq < 99)
return 0;
return 1;
}
{
*file_seq_r = 100;
}
const struct mail_transaction_header **hdr_r,
const void **data_r)
{
static struct mail_transaction_header hdr;
static struct mail_transaction_expunge_guid exp;
static struct mail_transaction_expunge old_exp;
return 0;
if (mail_guids[expunge_idx][0] == 0) {
} else {
}
if (expunge_idx != nonexternal_idx)
expunge_idx++;
return 1;
}
{
}
{
expunge_idx = 0;
}
static void test_mailbox_get_expunges(void)
{
const struct mailbox_expunge_rec *exp;
unsigned int count;
test_begin("mailbox get expunges");
nonexternal_idx = 1;
&expunges) == 0);
test_end();
}
int main(void)
{
static void (*test_functions[])(void) = {
};
unsigned int i, j;
for (i = 0; i < N_ELEMENTS(mail_guids); i++) {
for (j = 0; j < GUID_128_SIZE; j++)
mail_guids[i][j] = j + i + 1;
}
return test_run(test_functions);
}