From 3479292b9148428cca518f884263d7bf9f80b466 Mon Sep 17 00:00:00 2001
From: Mattias Andrée <maandree@kth.se>
Date: Sat, 9 Dec 2017 18:33:35 +0100
Subject: makefile: add check
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Mattias Andrée <maandree@kth.se>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index fab5f8d..cb36b2c 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,10 @@ timeprefix: timeprefix.o
 .c.o:
 	$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS)
 
+check: timeprefix
+	test "$$(printf '%s\n' a b c d e | ./timeprefix | sed 's/[0-9]/0/g' | md5sum | tr -Cd '[:xdigit:]\n')" \
+		= "3f1efed82f846e18973bd016fe5aeba4"
+
 install: timeprefix
 	mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
 	mkdir -p -- "$(DESTDIR)$(PREFIX)/share/licenses/timeprefix"
@@ -30,4 +34,4 @@ clean:
 .SUFFIXES:
 .SUFFIXES: .o .c
 
-.PHONY: all install uninstall clean
+.PHONY: all check install uninstall clean
-- 
cgit v1.2.3-70-g09d2