From 5592e36f542989e9b009c29f5a149a2bdcfbe809 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Mon, 30 Aug 2010 04:42:06 -0400 Subject: [PATCH] Regression tests featuring ais1.i anf ais2.i. --- .gitignore | 2 ++ pit/CATALOG | 8 ++++++-- pit/Makefile | 4 ++++ pit/tests/ais1.chk | 16 ++++++++++++++++ pit/tests/ais1.tst | 8 ++++++++ pit/tests/ais2.chk | 10 ++++++++++ pit/tests/ais2.tst | 5 +++++ 7 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 pit/tests/ais1.chk create mode 100644 pit/tests/ais1.tst create mode 100644 pit/tests/ais2.chk create mode 100644 pit/tests/ais2.tst diff --git a/.gitignore b/.gitignore index 70ef795..eedd483 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,8 @@ pit/rot13 pit/rot13b pit/sample pit/sort +pit/tests/ais1 +pit/tests/ais2 pit/tests/count pit/tests/hello pit/tests/ignorret diff --git a/pit/CATALOG b/pit/CATALOG index a5ee9ee..afcf980 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -120,8 +120,12 @@ by David Moews tests/test2.i + Reads in two numbers and reports their product by Alex Smith - tests/ais1.i A very simple test program - tests/ais2.i A demonstration of computed ABSTAIN's power + tests/ais1.i + Reads in numbers terminated with zero and + writes them back out, testing COME FROM/NEXT + interaction. + tests/ais2.i + A demonstration of computed ABSTAIN's power. + Computes the Fibinacci sequence; in the innput file, + ONE means compute the nextvterm and ZERO means stop. tests/compucome.i A program to test computed COME FROM tests/onceagain.i + A single-threaded program testing ONCE and AGAIN tests/arrtest.i A program to test some changes I made to the grammar. diff --git a/pit/Makefile b/pit/Makefile index c43a8e8..381903a 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -39,6 +39,8 @@ BASE2SOURCES = \ ./rot13b.i \ ./sample.i \ ./sort.i \ + ./tests/ais1.i \ + ./tests/ais2.i \ ./tests/hello.i \ ./tests/ignorret \ ./tests/iogerunds.i \ @@ -115,6 +117,8 @@ test: $(TARGETS) @cat tpk.tst | ./tpk | ./regresscheck tpk @cat unlambda.tst | ./unlambda | ./regresscheck unlambda @cat yapp.tst | yapp >yapptest.i && $(ICK) yapptest.i && yapptest | regresscheck -c yapp.tst yapp; rm -f yapptest.i yapptest + @cat tests/ais1.tst | ./tests/ais1 | ./regresscheck tests/ais1 + @cat tests/ais2.tst | ./tests/ais2 | ./regresscheck tests/ais2 @./tests/count | ./regresscheck tests/count @./tests/hello | ./regresscheck tests/hello @./tests/ignorret | ./regresscheck tests/ignorret diff --git a/pit/tests/ais1.chk b/pit/tests/ais1.chk new file mode 100644 index 0000000..c169a9e --- /dev/null +++ b/pit/tests/ais1.chk @@ -0,0 +1,16 @@ + +I + +III + +I + +IV + +I + +V + +IX +_ + diff --git a/pit/tests/ais1.tst b/pit/tests/ais1.tst new file mode 100644 index 0000000..013c2fa --- /dev/null +++ b/pit/tests/ais1.tst @@ -0,0 +1,8 @@ +ONE +THREE +ONE +FOUR +ONE +FIVE +NINE +ZERO diff --git a/pit/tests/ais2.chk b/pit/tests/ais2.chk new file mode 100644 index 0000000..5919922 --- /dev/null +++ b/pit/tests/ais2.chk @@ -0,0 +1,10 @@ + +I + +I + +II + +III + +V diff --git a/pit/tests/ais2.tst b/pit/tests/ais2.tst new file mode 100644 index 0000000..8dc8b02 --- /dev/null +++ b/pit/tests/ais2.tst @@ -0,0 +1,5 @@ +ONE +ONE +ONE +ONE +ZERO -- 2.43.0