bincimap

Log | Files | Refs | LICENSE

tests.cc (704B)


      1 #include "framework.h"
      2 #include <unistd.h>
      3 #include <stdlib.h>
      4 #include <stdio.h>
      5 #include <sys/stat.h>
      6 #include <sys/types.h>
      7 
      8 int main(void)
      9 {
     10   setenv("BINCIMAP_LOGIN", "LOGIN+1", 1);
     11 
     12   FrameWork::setConfig("Mailbox", "path", "Maildir");
     13   FrameWork::setConfig("Mailbox", "auto create inbox", "yes");
     14   FrameWork::setConfig("Mailbox", "umask", "077");
     15 
     16   FrameWork f("../src/bincimapd");
     17   
     18   f.test("", "1 OK LOGIN completed\r\n");
     19   f.test("1 NOOP\r\n", "1 OK NOOP completed\r\n");
     20   f.test("1 CREATE INBOX/TestMailbox\r\n", "1 OK CREATE completed\r\n");
     21   f.test("1 DELETE INBOX/TestMailbox\r\n", "1 OK DELETE completed\r\n");
     22   f.test("X LOGOUT\r\n", "X OK LOGOUT completed\r\n");
     23 
     24   return 0;
     25 }