diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 8 | ||||
-rw-r--r-- | test/Makefile.in | 8 | ||||
-rw-r--r-- | test/profile3.awk | 9 | ||||
-rw-r--r-- | test/profile3.ok | 14 |
5 files changed, 44 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 87190839..b0593353 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +Sun Feb 13 19:55:15 2011 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (profile3): New test. + * profile3.awk, profile3.ok: New files. + Fri Feb 11 10:29:48 2011 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (manyfiles): Bump limit up above 1024, which is diff --git a/test/Makefile.am b/test/Makefile.am index 2d5060eb..65082f7f 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -518,6 +518,8 @@ EXTRA_DIST = \ prdupval.in \ prdupval.ok \ profile2.ok \ + profile3.awk \ + profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ @@ -1322,6 +1324,12 @@ profile2: @sed 1,2d < awkprof.out > _$@; rm awkprof.out @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ +profile3: + @echo $@ + @$(PGAWK) -f $(srcdir)/$@.awk > /dev/null + @sed 1,2d < awkprof.out > _$@; rm awkprof.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + # Targets generated for other tests: include Maketests diff --git a/test/Makefile.in b/test/Makefile.in index a32ae99c..f5ec9b1a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -703,6 +703,8 @@ EXTRA_DIST = \ prdupval.in \ prdupval.ok \ profile2.ok \ + profile3.awk \ + profile3.ok \ prec.awk \ prec.ok \ printf0.awk \ @@ -1669,6 +1671,12 @@ profile2: @$(PGAWK) -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null @sed 1,2d < awkprof.out > _$@; rm awkprof.out @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ + +profile3: + @echo $@ + @$(PGAWK) -f $(srcdir)/$@.awk > /dev/null + @sed 1,2d < awkprof.out > _$@; rm awkprof.out + @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ Gt-dummy: # file Maketests, generated from Makefile.am by the Gentests program addcomma: diff --git a/test/profile3.awk b/test/profile3.awk new file mode 100644 index 00000000..e519374e --- /dev/null +++ b/test/profile3.awk @@ -0,0 +1,9 @@ +BEGIN { + the_func = "p" + print @the_func("Hello") +} + +function p(str) +{ + print "! " str " !" +} diff --git a/test/profile3.ok b/test/profile3.ok new file mode 100644 index 00000000..50172c48 --- /dev/null +++ b/test/profile3.ok @@ -0,0 +1,14 @@ + # BEGIN block(s) + + BEGIN { + 1 the_func = "p" + 1 print @the_func("Hello") + } + + + # Functions, listed alphabetically + + 1 function p(str) + { + 1 print "! " str " !" + } |