summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtest12
-rw-r--r--tests/a1
-rw-r--r--tests/ab2
-rw-r--r--tests/abc3
-rw-r--r--tests/abcd4
-rw-r--r--tests/empty0
6 files changed, 22 insertions, 0 deletions
diff --git a/test b/test
new file mode 100755
index 0000000..972ba8c
--- /dev/null
+++ b/test
@@ -0,0 +1,12 @@
+#!/usr/bin/sh
+
+# Check boundary conditions with small files. Output should match input.
+for f in empty a ab abc abcd; do
+ ./markov <tests/$f > out
+ if !(diff tests/$f out > /dev/null); then
+ echo tests/$f: output of markov does not match input:
+ diff tests/$f out
+ exit 1
+ fi
+done
+rm out \ No newline at end of file
diff --git a/tests/a b/tests/a
new file mode 100644
index 0000000..7898192
--- /dev/null
+++ b/tests/a
@@ -0,0 +1 @@
+a
diff --git a/tests/ab b/tests/ab
new file mode 100644
index 0000000..422c2b7
--- /dev/null
+++ b/tests/ab
@@ -0,0 +1,2 @@
+a
+b
diff --git a/tests/abc b/tests/abc
new file mode 100644
index 0000000..de98044
--- /dev/null
+++ b/tests/abc
@@ -0,0 +1,3 @@
+a
+b
+c
diff --git a/tests/abcd b/tests/abcd
new file mode 100644
index 0000000..d68dd40
--- /dev/null
+++ b/tests/abcd
@@ -0,0 +1,4 @@
+a
+b
+c
+d
diff --git a/tests/empty b/tests/empty
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/empty