From a8c24ecfdee86b9ea9c35469f717fa3cf1b9b6ab Mon Sep 17 00:00:00 2001 From: Andy Spencer Date: Mon, 10 Jun 2013 03:25:00 +0000 Subject: [PATCH] Update tests --- makefile | 2 +- src/cal.h | 3 --- src/date.h | 3 --- src/test.c | 10 ++++++++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/makefile b/makefile index 244b08b..ec91b83 100644 --- a/makefile +++ b/makefile @@ -18,7 +18,7 @@ LDFLAGS ?= -lncursesw -lical 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 diff --git a/src/cal.h b/src/cal.h index 1242da8..2fb05cb 100644 --- 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); - -/* Test fuctions */ -void ical_test(void); diff --git a/src/date.h b/src/date.h index 2cf511d..189cd17 100644 --- a/src/date.h +++ b/src/date.h @@ -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); - -/* Tests */ -void date_test(void); diff --git a/src/test.c b/src/test.c index d67a6ae..a9ed06c 100644 --- a/src/test.c +++ b/src/test.c @@ -17,10 +17,16 @@ #include "date.h" #include "cal.h" +#include "util.h" + +void date_test(void); +void ical_test(void); 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; } -- 2.43.2