summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2024-08-31 15:20:11 -0400
committerSam Anthony <sam@samanthony.xyz>2024-08-31 15:28:31 -0400
commit29c1c728b20c838bc94c7342f4664e5ecbdac113 (patch)
treeca1c7bc76f420c547757c8b66743d9ec5452763d /test
parent7b9206498ee8d5f6327da84e72c00bbc6ff1cf48 (diff)
downloadmarkov-29c1c728b20c838bc94c7342f4664e5ecbdac113.zip
test that all generated words, pairs, and triples also occur in the input
Diffstat (limited to 'test')
-rwxr-xr-xtest6
1 files changed, 6 insertions, 0 deletions
diff --git a/test b/test
index 972ba8c..dd8e802 100755
--- a/test
+++ b/test
@@ -9,4 +9,10 @@ for f in empty a ab abc abcd; do
exit 1
fi
done
+rm out
+
+# Check that all words, pairs, and triples in output are in original.
+orig=tests/psalms
+./markov <$orig > out
+awk -f tests/match.awk $orig out
rm out \ No newline at end of file