From 78f9c4a62800d0d69909ff5d22b2c59bef88eb73 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 28 Aug 2010 11:00:14 -0400 Subject: [PATCH] Added regression tests featuring onceagain and unlambda. --- pit/CATALOG | 4 ++-- pit/Makefile | 3 +++ pit/tests/onceagain.chk | 28 ++++++++++++++++++++++++++++ pit/unlambda.chk | 1 + pit/unlambda.tst | 1 + 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 pit/tests/onceagain.chk create mode 100644 pit/unlambda.chk create mode 100644 pit/unlambda.tst diff --git a/pit/CATALOG b/pit/CATALOG index 5aff6e2..248c61e 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -102,7 +102,7 @@ by Donald Knuth tpk.doc Don's note about the algorithm by Oerjan Johansen - unlambda.i An Unlambda interpreter in INTERCAL + unlambda.i + An Unlambda interpreter in INTERCAL unlambda.doc Better-commented version of the above by Jeffrey Lee @@ -122,7 +122,7 @@ by Alex Smith tests/ais1.i A very simple test program tests/ais2.i A demonstration of computed ABSTAIN's power tests/compucome.i A program to test computed COME FROM - tests/onceagain.i A single-threaded program testing ONCE and AGAIN + 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 tests/arrtest.doc The history behind those changes tests/permute.i + A permutation-printing program to test backtracking diff --git a/pit/Makefile b/pit/Makefile index 522382d..2fb3be1 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -42,6 +42,7 @@ BASE2SOURCES = \ ./tests/limits.i \ ./tests/permute.i \ ./tests/sink.i \ + ./tests/onceagain.i \ ./tests/test1.i \ ./tests/test16bit.i \ ./tests/test2.i \ @@ -51,6 +52,7 @@ BASE2SOURCES = \ ./tests/testonce \ ./tests/testsplat.i \ ./tpk.i \ + ./unlambda.i \ ./yapp.i BASENSOURCES = \ @@ -101,6 +103,7 @@ test: $(TARGETS) @cp quine.i quine.chk; ./quine | ./regresscheck quine; rm quine.chk @cat sort.tst | ./sort | ./regresscheck sort @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 @./tests/count | ./regresscheck tests/count @./tests/hello | ./regresscheck tests/hello diff --git a/pit/tests/onceagain.chk b/pit/tests/onceagain.chk new file mode 100644 index 0000000..bc1c9ea --- /dev/null +++ b/pit/tests/onceagain.chk @@ -0,0 +1,28 @@ + +I + +II + +III + +III + +IV + +V + +VI + +II + +III + +IV + +VI + +IX + +VIII + +VIII diff --git a/pit/unlambda.chk b/pit/unlambda.chk new file mode 100644 index 0000000..802992c --- /dev/null +++ b/pit/unlambda.chk @@ -0,0 +1 @@ +Hello world diff --git a/pit/unlambda.tst b/pit/unlambda.tst new file mode 100644 index 0000000..8caf74c --- /dev/null +++ b/pit/unlambda.tst @@ -0,0 +1 @@ +`r```````````.H.e.l.l.o. .w.o.r.l.di -- 2.43.0