diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-26 16:27:43 -0400 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2016-05-26 16:27:43 -0400 |
commit | 4d634960a411622cfb2e757d8e98c84f7601e09e (patch) | |
tree | ce2b19842cf7d1e695d4aeac9b61459bb431b945 | |
parent | 1d6fd4d8bc7e4034fe45d78f31a7295f4592b3ec (diff) | |
download | egawk-4d634960a411622cfb2e757d8e98c84f7601e09e.tar.gz egawk-4d634960a411622cfb2e757d8e98c84f7601e09e.tar.bz2 egawk-4d634960a411622cfb2e757d8e98c84f7601e09e.zip |
New test, arrayind2.
-rw-r--r-- | test/ChangeLog | 6 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 9 | ||||
-rw-r--r-- | test/Maketests | 5 | ||||
-rw-r--r-- | test/arrayind2.awk | 8 | ||||
-rw-r--r-- | test/arrayind2.ok | 2 |
6 files changed, 32 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index c395fc69..b9689557 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,9 @@ +2016-05-26 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (arrayind2): New test. + * arrayind2.awk, arrayind2.ok: New files. + Thanks to Andrew J. Schorr <aschorr@telemetry-investments.com>. + 2016-05-25 Arnold D. Robbins <arnold@skeeve.com> * arrayind1.awk: Flush writes to stderr. We hope this helps diff --git a/test/Makefile.am b/test/Makefile.am index 63990647..8d62e802 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -55,6 +55,8 @@ EXTRA_DIST = \ arrayind1.awk \ arrayind1.in \ arrayind1.ok \ + arrayind2.awk \ + arrayind2.ok \ arrayparm.awk \ arrayparm.ok \ arrayprm2.awk \ @@ -1094,7 +1096,7 @@ CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayind1 arrayparm arrayprm2 arrayprm3 \ + addcomma anchgsub argarray arrayind1 arrayind2 arrayparm arrayprm2 arrayprm3 \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 aryprm9 arysubnm asgext awkpath \ diff --git a/test/Makefile.in b/test/Makefile.in index cc44371c..37e9b9b5 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -312,6 +312,8 @@ EXTRA_DIST = \ arrayind1.awk \ arrayind1.in \ arrayind1.ok \ + arrayind2.awk \ + arrayind2.ok \ arrayparm.awk \ arrayparm.ok \ arrayprm2.awk \ @@ -1350,7 +1352,7 @@ CLEANFILES = core core.* fmtspcl.ok # try to keep these sorted. each letter starts a new line BASIC_TESTS = \ - addcomma anchgsub argarray arrayind1 arrayparm arrayprm2 arrayprm3 \ + addcomma anchgsub argarray arrayind1 arrayind2 arrayparm arrayprm2 arrayprm3 \ arrayref arrymem1 arryref2 arryref3 arryref4 arryref5 arynasty \ arynocls aryprm1 aryprm2 aryprm3 aryprm4 aryprm5 aryprm6 aryprm7 \ aryprm8 aryprm9 arysubnm asgext awkpath \ @@ -2699,6 +2701,11 @@ arrayind1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +arrayind2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + arrayparm: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/Maketests b/test/Maketests index a831496c..0895d23d 100644 --- a/test/Maketests +++ b/test/Maketests @@ -15,6 +15,11 @@ arrayind1: @AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ +arrayind2: + @echo $@ + @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ + @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@ + arrayparm: @echo $@ @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@ diff --git a/test/arrayind2.awk b/test/arrayind2.awk new file mode 100644 index 00000000..200694eb --- /dev/null +++ b/test/arrayind2.awk @@ -0,0 +1,8 @@ +BEGIN { + pos[0] = 0 + posout[0] = 0 + split("00000779770060", f) # f[1] is a strnum + print typeof(f[1]) + pos[f[1]] = 1 + print typeof(f[1]) +} diff --git a/test/arrayind2.ok b/test/arrayind2.ok new file mode 100644 index 00000000..335b2005 --- /dev/null +++ b/test/arrayind2.ok @@ -0,0 +1,2 @@ +strnum +strnum |