aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2017-10-19 21:10:04 +0200
committerMattias Andrée <maandree@kth.se>2017-10-19 21:12:00 +0200
commit5fa32f897a70cea258d62f7e234cca0245f1eaf4 (patch)
tree876a95cbc75f6cf9dd2812416e0dc0e4836edbae
parentSimplift and change style (diff)
downloadslack-5fa32f897a70cea258d62f7e234cca0245f1eaf4.tar.gz
slack-5fa32f897a70cea258d62f7e234cca0245f1eaf4.tar.bz2
slack-5fa32f897a70cea258d62f7e234cca0245f1eaf4.tar.xz
Add make check3.0
Signed-off-by: Mattias Andrée <maandree@kth.se>
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