aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile15
1 files changed, 14 insertions, 1 deletions
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