]> Pileus Git - lackey/commitdiff
Update tests
authorAndy Spencer <andy753421@gmail.com>
Mon, 10 Jun 2013 03:25:00 +0000 (03:25 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 10 Jun 2013 04:56:46 +0000 (04:56 +0000)
makefile
src/cal.h
src/date.h
src/test.c

index 244b08b71f633c786b75196e75bde5aa488088a3..ec91b830da4a2d8d1e50e99f47a53a7bd851aa82 100644 (file)
--- a/makefile
+++ b/makefile
@@ -18,7 +18,7 @@ LDFLAGS   ?= -lncursesw -lical
 PROG      ?= lackey
 PROG_SRC  ?= main view date cal util
 TEST      ?= test
 PROG      ?= lackey
 PROG_SRC  ?= main view date cal util
 TEST      ?= test
-TEST_SRC  ?= test date util
+TEST_SRC  ?= test date cal util
 VIEWS     ?= day week month year events todo settings help
 CALS      ?= dummy ical
 
 VIEWS     ?= day week month year events todo settings help
 CALS      ?= dummy ical
 
index 1242da8f5131c24127298b798f05155773a3f378..2fb05cb692bb1782ae8aa287ffc151d5a415488a 100644 (file)
--- a/src/cal.h
+++ b/src/cal.h
@@ -58,6 +58,3 @@ extern todo_t  *TODOS;
 /* Calendar functions */
 void cal_init(void);
 void cal_load(year_t year, month_t month, day_t day, int days);
 /* Calendar functions */
 void cal_init(void);
 void cal_load(year_t year, month_t month, day_t day, int days);
-
-/* Test fuctions */
-void ical_test(void);
index 2cf511d2f9d3999a895ff06f83a65cf9d2073819..189cd173898072e8a5f76e9b6652f9c32bc95b61 100644 (file)
@@ -89,6 +89,3 @@ const char *month_to_string(month_t month);
 const char *day_to_st(wday_t day);
 const char *day_to_str(wday_t day);
 const char *day_to_string(wday_t day);
 const char *day_to_st(wday_t day);
 const char *day_to_str(wday_t day);
 const char *day_to_string(wday_t day);
-
-/* Tests */
-void date_test(void);
index d67a6ae0ccd3e14fa10a978c4c6d231080cae299..a9ed06c4c9c958616d0d81ebdd0bf6dceede8bd3 100644 (file)
 
 #include "date.h"
 #include "cal.h"
 
 #include "date.h"
 #include "cal.h"
+#include "util.h"
+
+void date_test(void);
+void ical_test(void);
 
 int main(int argc, char **argv)
 {
 
 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], "ical")) ical_test();
+       }
        return 0;
 }
        return 0;
 }