diff options
-rw-r--r-- | pc/ChangeLog | 4 | ||||
-rw-r--r-- | pc/Makefile.tst | 16 | ||||
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/Makefile.am | 10 | ||||
-rw-r--r-- | test/Makefile.in | 20 | ||||
-rw-r--r-- | test/Maketests | 10 | ||||
-rw-r--r-- | test/profile14.awk | 21 | ||||
-rw-r--r-- | test/profile14.ok | 37 | ||||
-rw-r--r-- | test/profile15.awk | 24 | ||||
-rw-r--r-- | test/profile15.ok | 27 |
10 files changed, 168 insertions, 6 deletions
diff --git a/pc/ChangeLog b/pc/ChangeLog index d41f8db3..d58d2958 100644 --- a/pc/ChangeLog +++ b/pc/ChangeLog @@ -1,3 +1,7 @@ +2020-08-17 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.tst: Rebuilt. + 2020-08-04 Arnold D. Robbins <arnold@skeeve.com> * Makefile.tst: Rebuilt. diff --git a/pc/Makefile.tst b/pc/Makefile.tst index 26d93d78..98841191 100644 --- a/pc/Makefile.tst +++ b/pc/Makefile.tst @@ -210,7 +210,8 @@ GAWK_EXT_TESTS = \ nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 nsindirect2 nsprof1 nsprof2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge \ procinfs profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ - profile7 profile8 profile9 profile10 profile11 profile12 profile13 pty1 pty2 \ + profile7 profile8 profile9 profile10 profile11 profile12 profile13 \ + profile14 profile15 pty1 pty2 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin \ rsstart1 rsstart2 rsstart3 rstest6 \ sandbox1 shadow shadowbuiltin sortfor sortfor2 sortu \ @@ -271,7 +272,8 @@ NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 muldimpo # List of tests that need --pretty-print NEED_PRETTY = nsprof1 nsprof2 \ - profile4 profile5 profile8 profile9 profile10 profile11 profile13 + profile4 profile5 profile8 profile9 profile10 profile11 profile13 \ + profile14 profile15 # List of tests that need --re-interval @@ -3094,6 +3096,16 @@ profile13: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile14: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +profile15: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + regnul1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/ChangeLog b/test/ChangeLog index 73f77217..9ede01c2 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +2020-08-17 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (EXTRA_DIST): New tests, profile14 and profile15. + * profile14.awk, profile14.ok, profile15.awk, profile15.ok: New files. + 2020-08-12 Arnold D. Robbins <arnold@skeeve.com> * nsprof1.ok, nsprof2.ok: Updated after code changes. diff --git a/test/Makefile.am b/test/Makefile.am index e598dee9..dcef19cb 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -982,6 +982,10 @@ EXTRA_DIST = \ profile12.ok \ profile13.awk \ profile13.ok \ + profile14.awk \ + profile14.ok \ + profile15.awk \ + profile15.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ @@ -1424,7 +1428,8 @@ GAWK_EXT_TESTS = \ nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 nsindirect2 nsprof1 nsprof2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge \ procinfs profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ - profile7 profile8 profile9 profile10 profile11 profile12 profile13 pty1 pty2 \ + profile7 profile8 profile9 profile10 profile11 profile12 profile13 \ + profile14 profile15 pty1 pty2 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin \ rsstart1 rsstart2 rsstart3 rstest6 \ sandbox1 shadow shadowbuiltin sortfor sortfor2 sortu \ @@ -1486,7 +1491,8 @@ NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 muldimpo # List of tests that need --pretty-print NEED_PRETTY = nsprof1 nsprof2 \ - profile4 profile5 profile8 profile9 profile10 profile11 profile13 + profile4 profile5 profile8 profile9 profile10 profile11 profile13 \ + profile14 profile15 # List of tests that need --re-interval NEED_RE_INTERVAL = gsubtst3 reint reint2 diff --git a/test/Makefile.in b/test/Makefile.in index 324b3614..491daedc 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1245,6 +1245,10 @@ EXTRA_DIST = \ profile12.ok \ profile13.awk \ profile13.ok \ + profile14.awk \ + profile14.ok \ + profile15.awk \ + profile15.ok \ prt1eval.awk \ prt1eval.ok \ prtoeval.awk \ @@ -1687,7 +1691,8 @@ GAWK_EXT_TESTS = \ nsbad nsbad_cmd nsforloop nsfuncrecurse nsindirect1 nsindirect2 nsprof1 nsprof2 \ patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge \ procinfs profile0 profile1 profile2 profile3 profile4 profile5 profile6 \ - profile7 profile8 profile9 profile10 profile11 profile12 profile13 pty1 pty2 \ + profile7 profile8 profile9 profile10 profile11 profile12 profile13 \ + profile14 profile15 pty1 pty2 \ rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin \ rsstart1 rsstart2 rsstart3 rstest6 \ sandbox1 shadow shadowbuiltin sortfor sortfor2 sortu \ @@ -1748,7 +1753,8 @@ NEED_POSIX = escapebrace printf0 posix2008sub paramasfunc1 paramasfunc2 muldimpo # List of tests that need --pretty-print NEED_PRETTY = nsprof1 nsprof2 \ - profile4 profile5 profile8 profile9 profile10 profile11 profile13 + profile4 profile5 profile8 profile9 profile10 profile11 profile13 \ + profile14 profile15 # List of tests that need --re-interval @@ -4732,6 +4738,16 @@ profile13: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile14: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +profile15: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + regnul1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index ee2c8282..b01e0c54 100644 --- a/test/Maketests +++ b/test/Maketests @@ -1842,6 +1842,16 @@ profile13: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +profile14: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + +profile15: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk --pretty-print=_$@ >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + regnul1: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/profile14.awk b/test/profile14.awk new file mode 100644 index 00000000..bf875dbf --- /dev/null +++ b/test/profile14.awk @@ -0,0 +1,21 @@ +#: 200810_ Prettyprint weirdness to show Arnold +BEGIN { + IGNORECASE = 1; + printf("\n"); + printf("test \"%s\"\tin FUNCTAB=%s (good!)\n","masterlib::libfunc","masterlib::libfunc" in FUNCTAB); + exit; +#..1.1.1............... +} # e-o-begin +#..2.2.2............. +@namespace "nlib" +function tstlib(note){ printf("Tstv1=%s; from @namespace nlib\n",Tstv1); +}# e-o-function tstlib() +#..3.3.3............. +@namespace "masterlib" +# masterlib is library of "default" user-defined functions +function libfunc(note){ printf("%s:\tHello World from @namespace masterlib\n",note);} +#..4.4.4............. +@namespace "awk" +# return to program's awk space +function overridefunc(note){ printf("%s:\tHello Lone Star state from @namespace awk\n",note);} +# --5-5-5----------- diff --git a/test/profile14.ok b/test/profile14.ok new file mode 100644 index 00000000..993edd69 --- /dev/null +++ b/test/profile14.ok @@ -0,0 +1,37 @@ +#: 200810_ Prettyprint weirdness to show Arnold +BEGIN { + IGNORECASE = 1 + printf ("\n") + printf "test \"%s\"\tin FUNCTAB=%s (good!)\n", "masterlib::libfunc", "masterlib::libfunc" in FUNCTAB + exit + #..1.1.1............... +} + +# --5-5-5----------- +#..4.4.4............. +function overridefunc(note) +{ + printf "%s:\tHello Lone Star state from @namespace awk\n", note +} + +@namespace "masterlib" # masterlib is library of "default" user-defined functions + + +# e-o-function tstlib() + +#..3.3.3............. +function libfunc(note) +{ + printf "%s:\tHello World from @namespace masterlib\n", note +} + +@namespace "nlib" + + +# e-o-begin + +#..2.2.2............. +function tstlib(note) +{ + printf "Tstv1=%s;\tfrom @namespace nlib\n", Tstv1 +} diff --git a/test/profile15.awk b/test/profile15.awk new file mode 100644 index 00000000..29fe9de2 --- /dev/null +++ b/test/profile15.awk @@ -0,0 +1,24 @@ +# in namespace awk +function zzzz() +{ + return "zzz" +} + +function nnn() +{ + return "nnn" +} + +@namespace "nnn" +function abc() +{ + return "nnn::abc" +} + +@namespace "bbb" + +function zzz() +{ + return "bbb::zzz" +} + diff --git a/test/profile15.ok b/test/profile15.ok new file mode 100644 index 00000000..c6eea608 --- /dev/null +++ b/test/profile15.ok @@ -0,0 +1,27 @@ +# in namespace awk + +function nnn() +{ + return "nnn" +} + +function zzzz() +{ + return "zzz" +} + +@namespace "bbb" + + +function zzz() +{ + return "bbb::zzz" +} + +@namespace "nnn" + + +function abc() +{ + return "nnn::abc" +} |