diff options
| -rwxr-xr-x | test | 12 | ||||
| -rw-r--r-- | tests/a | 1 | ||||
| -rw-r--r-- | tests/ab | 2 | ||||
| -rw-r--r-- | tests/abc | 3 | ||||
| -rw-r--r-- | tests/abcd | 4 | ||||
| -rw-r--r-- | tests/empty | 0 |
6 files changed, 22 insertions, 0 deletions
@@ -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 @@ -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 |