about summary refs log tree commit diff
path: root/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/server.c b/server.c
index 3dcdea3..751d414 100644
--- a/server.c
+++ b/server.c
@@ -63,9 +63,11 @@ static enum kcgi_err request(struct kreq *req) {
 
 int main(int argc, char *argv[]) {
 	bool fastCGI = false;
+	bool test = false;
 
-	for (int opt; 0 < (opt = getopt(argc, argv, "fps:"));) {
+	for (int opt; 0 < (opt = getopt(argc, argv, "cfps:"));) {
 		switch (opt) {
+			break; case 'c': test = true;
 			break; case 'f': fastCGI = true;
 			break; case 'p': pagePublic = true;
 			break; case 's': htmlStylesheet = optarg;
@@ -98,6 +100,8 @@ int main(int argc, char *argv[]) {
 	prepare(&stmt.eventsAfter, EventsAfterQuery);
 	prepare(&stmt.eventsBefore, EventsBeforeQuery);
 	
+	if (test) return EX_OK;
+	
 	if (fastCGI) {
 		struct kfcgi *fcgi;
 		enum kcgi_err error = khttp_fcgi_init(