summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
authorZach DeCook <zachdecook@librem.one>2023-10-21 12:52:16 -0400
committerZach DeCook <zachdecook@librem.one>2023-10-21 12:52:16 -0400
commit56b4f827f86accbb9e007ff32c5413bcbafbfc19 (patch)
treef0327b0449d313742335415f3a68810db04330c2 /Makefile
parentf6779d13690680bef9511ebfc160a8b85f8c9e32 (diff)
downloadswipeGuess-56b4f827f86accbb9e007ff32c5413bcbafbfc19.tar.gz
Makefile: Add test
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 8dc42f0..6b730a8 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,11 @@ words-qwerty-en: /usr/share/dict/american-english mapScore
 /usr/share/dict/american-english:
 	apk add words-en
 
+test: words-qwerty-en swipeGuess
+	test `echo "asdfghjkl" | ./swipeGuess words-qwerty-en` = "all"
+	test `echo "dfghuiokmnhyt" | ./swipeGuess words-qwerty-en 1 "'"` = "don't"
+	test "`echo "tyuiopoiuytrewertyuiuytrer" | ./swipeGuess words-qwerty-en 2`" = "`printf "typewriter\ttorturer"`"
+
 install: all
 	install -m755 swipeGuess -D -t "$(DESTDIR)/$(PREFIX)/bin/"
 	install -m755 mapScore -D -t "$(DESTDIR)/$(PREFIX)/bin/"