X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fmbox%2Fmbox1.c;fp=test%2Fmbox%2Fmbox1.c;h=82c7ed8ac883b473703a7bc9f372fdd53bf4caa2;hb=18f466a66abebb91634853a5eb2dc7cadc3c8ce2;hp=0000000000000000000000000000000000000000;hpb=0f3b8bcc6fe2e3beeec7c834d9a64dca48a4f1b7;p=idzebra-moved-to-github.git diff --git a/test/mbox/mbox1.c b/test/mbox/mbox1.c new file mode 100644 index 0000000..82c7ed8 --- /dev/null +++ b/test/mbox/mbox1.c @@ -0,0 +1,54 @@ +/* $Id: mbox1.c,v 1.1 2005-04-28 09:18:20 adam Exp $ + Copyright (C) 1995-2005 + Index Data ApS + +This file is part of the Zebra server. + +Zebra is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2, or (at your option) any later +version. + +Zebra is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Zebra; see the file LICENSE.zebra. If not, write to the +Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + +#include "testlib.h" + +int main(int argc, char **argv) +{ + char path[256]; + + ZebraService zs = start_up(0, argc, argv); + ZebraHandle zh = zebra_open(zs); + + check_filter(zs, "grs.regx"); + zebra_select_database(zh, "Default"); + + zebra_init(zh); + + zebra_begin_trans(zh, 1); + sprintf(path, "%.200s/mail1.mbx", get_srcdir()); + zebra_repository_update(zh, path); + + sprintf(path, "%.200s/mail3.mbx", get_srcdir()); + zebra_repository_update(zh, path); + +#if 0 + /* bug #234 */ + sprintf(path, "%.200s/invalid.mbx", get_srcdir()); + zebra_repository_update(zh, path); +#endif + + zebra_end_trans(zh); + zebra_commit(zh); + + return close_down(zh, zs, 0); +}