From 5fa32f897a70cea258d62f7e234cca0245f1eaf4 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 19 Oct 2017 21:10:04 +0200 Subject: Add make check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- Makefile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2cd5a07..b2b3729 100644 --- a/Makefile +++ b/Makefile @@ -11,6 +11,19 @@ slack: slack.o slack.o: slack.c arg.h $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS) +check: + test $$(./slack 1ms ./slack get) = 1ms + test $$(./slack 1ms ./slack GET) = 1000000 + test $$(./slack 1 ./slack reset ./slack GET) = $$(./slack GET) + ./slack 1 true + ./slack reset true + ! ./slack 1 2>/dev/null + ! ./slack reset 2>/dev/null + ! ./slack x 2>/dev/null + ! ./slack x x 2>/dev/null + ! ./slack get x 2>/dev/null + ! ./slack GET x 2>/dev/null + install: slack mkdir -p -- "$(DESTDIR)$(PREFIX)/bin" mkdir -p -- "$(DESTDIR)$(MANPREFIX)/man1" @@ -29,4 +42,4 @@ clean: .SUFFIXES: -.PHONY: all install uninstall clean +.PHONY: all check install uninstall clean -- cgit v1.2.3-70-g09d2