aboutsummaryrefslogtreecommitdiffstats
path: root/test/Makefile
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:09:58 +0300
committerArnold D. Robbins <arnold@skeeve.com>2010-07-16 12:09:58 +0300
commitcae8bc6ced84c12590e3554a06a952283735363a (patch)
treeca4f38bfcb1312bfb62fc693564d68f3e9b3e973 /test/Makefile
parentdbd583bd2b8a6dd40c622875a4e197360cb5aba7 (diff)
downloadegawk-cae8bc6ced84c12590e3554a06a952283735363a.tar.gz
egawk-cae8bc6ced84c12590e3554a06a952283735363a.tar.bz2
egawk-cae8bc6ced84c12590e3554a06a952283735363a.zip
Move to 2.14.
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile133
1 files changed, 133 insertions, 0 deletions
diff --git a/test/Makefile b/test/Makefile
new file mode 100644
index 00000000..dcf4f15f
--- /dev/null
+++ b/test/Makefile
@@ -0,0 +1,133 @@
+SHELL = /bin/sh
+
+all: msg swaplns messages argarray longwrds \
+ getline inftest fstabplus compare arrayref rs fsrs rand \
+ fsbs negexp asgext anchgsub splitargv awkpath nfset reparse
+
+gawk.extensions: fieldwidths ignorecase posix manyfiles igncfs
+
+bigtest: all pound-bang gawk.extensions
+
+extra: regtest
+
+pound-bang::
+ cp ../gawk /tmp && chmod +x pound-bang && ./pound-bang pound-bang >tmp
+ rm -f /tmp/gawk
+ cmp pound-bang.good tmp && rm -f tmp
+
+msg::
+ @echo 'Any output from "cmp" is bad news, although some differences'
+ @echo 'in floating point values are probably benign -- in particular,'
+ @echo 'some systems may omit a leading zero and the floating point'
+ @echo 'precision may lead to slightly different output in a few cases.'
+
+swaplns::
+ @../gawk -f swaplns.awk data >tmp
+ cmp swaplns.good tmp && rm -f tmp
+
+messages::
+ @../gawk -f messages.awk >out2 2>out3
+ cmp out1.good out1 && cmp out2.good out2 && cmp out3.good out3 && \
+ rm -f out1 out2 out3
+
+argarray::
+ @TEST=test ../gawk -f argarray.awk >tmp
+ cmp argarray.good tmp && rm -f tmp
+
+fstabplus::
+ @echo '1 2' | ../gawk -f fstabplus >tmp
+ cmp fstabplus.good tmp && rm -f tmp
+
+fsrs::
+ @../gawk -f fsrs.awk fsrs.in >tmp
+ cmp fsrs.good tmp && rm -f tmp
+
+igncfs::
+ @../gawk -f igncfs.awk igncfs.in >tmp
+ cmp igncfs.good tmp && rm -f tmp
+
+longwrds::
+ @../gawk -f longwrds.awk manpage | sort >tmp
+ cmp longwrds.good tmp && rm -f tmp
+
+fieldwidths::
+ @echo '123456789' | ../gawk -v FIELDWIDTHS="2 3 4" '{print $$2}' >tmp
+ cmp fieldwidths.good tmp && rm -f tmp
+
+ignorecase::
+ @echo xYz | ../gawk -v IGNORECASE=1 '{sub(/y/, ""); print}' >tmp
+ cmp ignorecase.good tmp && rm -f tmp
+
+regtest::
+ @echo 'Some of the output from regtest is very system specific, do not'
+ @echo 'be distressed if your output differs from that distributed.'
+ @echo 'Manual inspection is called for.'
+ AWK=`pwd`/../gawk ./regtest
+
+posix::
+ @echo '1:2,3 4' | ../gawk -f posix >tmp
+ cmp posix.good tmp && rm -f tmp
+
+manyfiles::
+ @mkdir junk
+ @../gawk 'BEGIN { for (i = 1; i <= 100; i++) print i, i}' >tmp
+ @../gawk -f manyfiles.awk tmp tmp
+ @echo -n "This number better be 1 ->"
+ @wc -l junk/* | ../gawk '$$1 != 2' | wc -l
+ @rm -rf junk tmp
+
+compare::
+ @../gawk -f compare.awk 0 1 compare.in >tmp
+ cmp compare.good tmp && rm -f tmp
+
+arrayref::
+ @../gawk -f arrayref >tmp
+ cmp arrayref.good tmp && rm -f tmp
+
+rs::
+ @../gawk -v RS="" '{print $$1, $$2}' rs.data >tmp
+ cmp rs.good tmp && rm -f tmp
+
+fsbs::
+ @../gawk -v FS='\' '{ print $$1, $$2 }' fsbs.in >tmp
+ cmp fsbs.good tmp && rm -f tmp
+
+inftest::
+ @../gawk -f inftest.awk >tmp
+ cmp inftest.good tmp && rm -f tmp
+
+getline::
+ @../gawk -f getline.awk getline.awk getline.awk >tmp
+ cmp getline.good tmp && rm -f tmp
+
+rand::
+ @echo The following line should just be 19 random numbers between 1 and 100
+ @../gawk -f rand.awk
+
+negexp::
+ @../gawk 'BEGIN {a = -2; print 10^a }' >tmp
+ cmp negexp.good tmp && rm -f tmp
+
+asgext::
+ @../gawk -f asgext.awk asgext.in >tmp
+ cmp asgext.good tmp && rm -f tmp
+
+anchgsub::
+ @../gawk -f anchgsub.awk anchgsub.in >tmp
+ cmp anchgsub.good tmp && rm -f tmp
+
+splitargv::
+ @../gawk -f splitargv.awk splitargv.in >tmp
+ cmp splitargv.good tmp && rm -f tmp
+
+awkpath::
+ @AWKPATH=".:lib" ../gawk -f awkpath.awk >tmp
+ cmp awkpath.good tmp && rm -f tmp
+
+nfset::
+ @../gawk -f nfset.awk nfset.in >tmp
+ cmp nfset.good tmp && rm -f tmp
+
+reparse::
+ @../gawk -f reparse.awk reparse.in >tmp
+ cmp reparse.good tmp && rm -f tmp