]> git.scottworley.com Git - overonion/commitdiff
Automate overonion test
authorScott Worley <scottworley@scottworley.com>
Sun, 22 Oct 2017 00:27:26 +0000 (17:27 -0700)
committerScott Worley <scottworley@scottworley.com>
Sun, 22 Oct 2017 00:27:26 +0000 (17:27 -0700)
Makefile
overonion_test [new file with mode: 0755]

index 6e2eacb511060fb9f047b7a3acc2104503fa7443..f733156799c7e6ff8f8b1887c204123714037a10 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@ depend: *.c
 
 test: reverse_test
        ./reverse_test
 
 test: reverse_test
        ./reverse_test
+       ./overonion_test
 
 .PHONY: clean distclean depend test
 
 
 .PHONY: clean distclean depend test
 
diff --git a/overonion_test b/overonion_test
new file mode 100755 (executable)
index 0000000..6ec2d61
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+d=$(mktemp -d)
+test_data=$0
+
+./overonion-make-key --make_INSECURE_key "$d/key"
+cmp --verbose <(./overonion e "$d/key" < "$test_data" | ./overonion d "$d/key") "$test_data"
+rm -r "$d"
+echo PASS