]> Pileus Git - lackey/blobdiff - src/test.c
Add Exchange Web Services calendar
[lackey] / src / test.c
index a9ed06c4c9c958616d0d81ebdd0bf6dceede8bd3..3ac33fb6ad26586a2dffde09ce6a21c99d73742b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2012 Andy Spencer <andy753421@gmail.com>
+ * Copyright (C) 2012-2013 Andy Spencer <andy753421@gmail.com>
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 #include "date.h"
 #include "cal.h"
+#include "conf.h"
 #include "util.h"
 
 void date_test(void);
-void ical_test(void);
+void conf_test(void);
+void ical_test(void *path);
+void ews_test(char *url, char *user, char *pass);
+void daemon_test();
 
 int main(int argc, char **argv)
 {
        for (int i = 1; i < argc; i++) {
-               if (match(argv[i], "date")) date_test();
-               if (match(argv[i], "ical")) ical_test();
+               if (match(argv[i], "date")) {
+                       date_test();
+               }
+               if (match(argv[i], "conf")) {
+                       conf_test();
+               }
+               if (match(argv[i], "ical")) {
+                       char *path = argv[++i];
+                       ical_test(path);
+               }
+               if (match(argv[i], "ews")) {
+                       char *url  = argv[++i];
+                       char *user = argv[++i];
+                       char *pass = argv[++i];
+                       ews_test(url, user, pass);
+               }
+               if (match(argv[i], "daemon")) {
+                       daemon_test();
+               }
        }
        return 0;
 }