diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 8 | ||||
-rw-r--r-- | test/Makefile.am | 28 | ||||
-rw-r--r-- | test/Makefile.in | 28 | ||||
-rw-r--r-- | test/incdupe4.ok | 2 | ||||
-rw-r--r-- | test/incdupe5.ok | 2 | ||||
-rw-r--r-- | test/incdupe6.ok | 3 | ||||
-rw-r--r-- | test/incdupe7.ok | 3 | ||||
-rw-r--r-- | test/inchello.awk | 1 |
8 files changed, 73 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 2b1ac648..94c6ef18 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,11 @@ +2012-08-11 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * Makefile.am (EXTRA_DIST): Add inchello.awk and incdupe[4-7].ok. + (GAWK_EXT_TESTS): Add incdupe[4-7]. + (incdupe[4-7]): New tests to ensure that mixing -f with include + causes a fatal error. + * incdupe[4-7].ok, inchello.awk: New files. + 2012-08-08 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (fts): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 3a8e48ca..c067f669 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -380,6 +380,11 @@ EXTRA_DIST = \ incdupe.ok \ incdupe2.ok \ incdupe3.ok \ + inchello.awk \ + incdupe4.ok \ + incdupe5.ok \ + incdupe6.ok \ + incdupe7.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -881,7 +886,8 @@ GAWK_EXT_TESTS = \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ strtonum switch2 \ - include include2 incdupe incdupe2 incdupe3 + include include2 incdupe incdupe2 incdupe3 \ + incdupe4 incdupe5 incdupe6 incdupe7 EXTRA_TESTS = inftest regtest @@ -1593,6 +1599,26 @@ incdupe3:: @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +incdupe4:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe5:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe6:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inchello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe7:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i inchello >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + testext:: @echo $@ @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk diff --git a/test/Makefile.in b/test/Makefile.in index 0ba7c5c5..10d7b6a5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -593,6 +593,11 @@ EXTRA_DIST = \ incdupe.ok \ incdupe2.ok \ incdupe3.ok \ + inchello.awk \ + incdupe4.ok \ + incdupe5.ok \ + incdupe6.ok \ + incdupe7.ok \ indirectcall.awk \ indirectcall.in \ indirectcall.ok \ @@ -1094,7 +1099,8 @@ GAWK_EXT_TESTS = \ rebuf regx8bit reint reint2 rsstart1 \ rsstart2 rsstart3 rstest6 shadow sortfor sortu splitarg4 strftime \ strtonum switch2 \ - include include2 incdupe incdupe2 incdupe3 + include include2 incdupe incdupe2 incdupe3 \ + incdupe4 incdupe5 incdupe6 incdupe7 EXTRA_TESTS = inftest regtest INET_TESTS = inetdayu inetdayt inetechu inetecht @@ -1976,6 +1982,26 @@ incdupe3:: @AWKPATH=$(srcdir) $(AWK) --lint -f hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +incdupe4:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe5:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i hello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe6:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -i inchello -f hello.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +incdupe7:: + @echo $@ + @AWKPATH=$(srcdir) $(AWK) --lint -f hello -i inchello >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + testext:: @echo $@ @$(AWK) '/^(@load|BEGIN)/,/^}/' $(top_srcdir)/extension/testext.c > testext.awk diff --git a/test/incdupe4.ok b/test/incdupe4.ok new file mode 100644 index 00000000..a6fc26e2 --- /dev/null +++ b/test/incdupe4.ok @@ -0,0 +1,2 @@ +gawk: fatal: can't include `hello.awk' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe5.ok b/test/incdupe5.ok new file mode 100644 index 00000000..a6fc26e2 --- /dev/null +++ b/test/incdupe5.ok @@ -0,0 +1,2 @@ +gawk: fatal: can't include `hello.awk' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe6.ok b/test/incdupe6.ok new file mode 100644 index 00000000..42a4f9fd --- /dev/null +++ b/test/incdupe6.ok @@ -0,0 +1,3 @@ +gawk: inchello:1: warning: `include' is a gawk extension +gawk: inchello:2: fatal: can't include `hello' and use it as a program file +EXIT CODE: 2 diff --git a/test/incdupe7.ok b/test/incdupe7.ok new file mode 100644 index 00000000..42a4f9fd --- /dev/null +++ b/test/incdupe7.ok @@ -0,0 +1,3 @@ +gawk: inchello:1: warning: `include' is a gawk extension +gawk: inchello:2: fatal: can't include `hello' and use it as a program file +EXIT CODE: 2 diff --git a/test/inchello.awk b/test/inchello.awk new file mode 100644 index 00000000..148d4bef --- /dev/null +++ b/test/inchello.awk @@ -0,0 +1 @@ +@include "hello" |