From d0d7b196a8fe3797208198ec822f5c216230843a Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 26 Aug 2010 20:39:55 -0400 Subject: [PATCH] Added a regressioon test using Don Knuth's tpk program. --- .gitignore | 1 + pit/CATALOG | 2 +- pit/Makefile | 1 + pit/tpk.chk | 44 ++++++++++++++++++++++++++++++++++++++++++++ pit/tpk.tst | 16 ++++++++++++++++ 5 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 pit/tpk.chk create mode 100644 pit/tpk.tst diff --git a/.gitignore b/.gitignore index b6fdd48..2b3e8dd 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ pit/rot13 pit/rot13b pit/sample pit/sort +pit/tpk pit/tests/hello pit/tests/iogerunds pit/tests/permute diff --git a/pit/CATALOG b/pit/CATALOG index 8bd742f..eea6564 100644 --- a/pit/CATALOG +++ b/pit/CATALOG @@ -94,7 +94,7 @@ By Brian Raiter fft.doc + Description of fft.i by Donald Knuth - tpk.i Don Knuth's implementation of the TPK algorithm + tpk.i + Don Knuth's implementation of the TPK algorithm tpk.doc Don's note about the algorithm by Oerjan Johansen diff --git a/pit/Makefile b/pit/Makefile index 73d9981..35f72ed 100644 --- a/pit/Makefile +++ b/pit/Makefile @@ -97,6 +97,7 @@ test: $(TARGETS) @echo "FIVE" | ./pi | ./regresscheck pi @cp quine.i quine.chk; ./quine | ./regresscheck quine; rm quine.chk @cat sort.tst | ./sort | ./regresscheck sort + @cat tpk.tst | ./tpk | ./regresscheck tpk @./tests/count | ./regresscheck tests/count @./tests/hello | ./regresscheck tests/hello @./tests/permute | ./regresscheck tests/permute diff --git a/pit/tpk.chk b/pit/tpk.chk new file mode 100644 index 0000000..bbb54d5 --- /dev/null +++ b/pit/tpk.chk @@ -0,0 +1,44 @@ + +X + +cmxcix + +IX + ______ +cccxcixCMXCIXDCCCXCVIII + +VIII + +cmxcix + +VII +_ + + +VI +______ +MMMCXLMDXCI + +V + ____ +clviDCCCMMMDCCCLXXXVIII + +IV + ____ +clviDCCCMMMDCCXL + +III + +cmxcix + +II + __ +cccxxMM + +I +____ +CXXVXIX +_ + + +M diff --git a/pit/tpk.tst b/pit/tpk.tst new file mode 100644 index 0000000..879dda4 --- /dev/null +++ b/pit/tpk.tst @@ -0,0 +1,16 @@ +ONE +ONE FIVE SIX TWO FIVE +FOUR OH OH OH OH OH OH +FIVE OH OH OH OH OH OH +THREE ONE FOUR ONE FIVE NINER TWO +THREE ONE FOUR ONE FIVE NINER THREE +SEVEN SIX EIGHT OH THREE THREE +ZERO +FOUR TWO NINE FOUR NINE SIX SEVEN TWO NINE FIVE +FOUR THREE OH ONE FOUR OH NINE +FOUR THREE OH ONE FOUR ONE OH + + + + + -- 2.43.0