/*
- * 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 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)
{
- //date_test();
- ical_test();
+ for (int i = 1; i < argc; i++) {
+ 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;
}