summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2023-04-13 21:28:02 +0300
committerArnold D. Robbins <arnold@skeeve.com>2023-04-13 21:28:02 +0300
commitb930d79a316d08c899787c0d2e39865913863a52 (patch)
tree39cb1196162e3cde279076b8d46c957e401d438b /test
parent654c103be236d56f7e1fdcb09c9602641e2037c3 (diff)
downloadgawk-b930d79a316d08c899787c0d2e39865913863a52.tar.gz
Bug fix for asort(SYMTAB, arr).
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am7
-rw-r--r--test/Makefile.in12
-rw-r--r--test/Maketests5
-rw-r--r--test/asortsymtab.awk10
-rw-r--r--test/asortsymtab.ok72
6 files changed, 107 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 19d7ead9..651fdb98 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,5 +1,10 @@
2023-04-13 Arnold D. Robbins <arnold@skeeve.com>
+ * Makefile.am (EXTRA_DIST): New test: asortsymtab.
+ * asortsymtab.awk, asortsymtab.ok: New files.
+
+2023-04-13 Arnold D. Robbins <arnold@skeeve.com>
+
* badargs.ok: Update after code changes.
2023-04-07 zhou shuiqing <zhoushuiqing321@outlook.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index b30d3d7a..cc99dfa9 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -127,15 +127,17 @@ EXTRA_DIST = \
asgext.ok \
asort.awk \
asort.ok \
+ asortbool.awk \
+ asortbool.ok \
asorti.awk \
asorti.ok \
+ asortsymtab.awk \
+ asortsymtab.ok \
assignnumfield.awk \
assignnumfield.in \
assignnumfield.ok \
assignnumfield2.awk \
assignnumfield2.ok \
- asortbool.awk \
- asortbool.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1502,6 +1504,7 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
arraysort2 arraytype asortbool backw badargs beginfile1 beginfile2 \
+ asortsymtab \
binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \
clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \
dbugeval3 dbugeval4 dbugtypedre1 dbugtypedre2 delsub \
diff --git a/test/Makefile.in b/test/Makefile.in
index ed835ab6..3ed140cc 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -395,15 +395,17 @@ EXTRA_DIST = \
asgext.ok \
asort.awk \
asort.ok \
+ asortbool.awk \
+ asortbool.ok \
asorti.awk \
asorti.ok \
+ asortsymtab.awk \
+ asortsymtab.ok \
assignnumfield.awk \
assignnumfield.in \
assignnumfield.ok \
assignnumfield2.awk \
assignnumfield2.ok \
- asortbool.awk \
- asortbool.ok \
awkpath.ok \
back89.awk \
back89.in \
@@ -1770,6 +1772,7 @@ UNIX_TESTS = \
GAWK_EXT_TESTS = \
aadelete1 aadelete2 aarray1 aasort aasorti argtest arraysort \
arraysort2 arraytype asortbool backw badargs beginfile1 beginfile2 \
+ asortsymtab \
binmode1 charasbytes clos1way clos1way2 clos1way3 clos1way4 \
clos1way5 clos1way6 colonwarn commas crlf dbugeval dbugeval2 \
dbugeval3 dbugeval4 dbugtypedre1 dbugtypedre2 delsub \
@@ -4441,6 +4444,11 @@ backw:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+asortsymtab:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
clos1way:
@echo $@
@-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=C; export GAWKLOCALE; \
diff --git a/test/Maketests b/test/Maketests
index a4b215c6..f532fc92 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1370,6 +1370,11 @@ backw:
@-AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+asortsymtab:
+ @echo $@
+ @-AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
clos1way:
@echo $@
@-[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=C; export GAWKLOCALE; \
diff --git a/test/asortsymtab.awk b/test/asortsymtab.awk
new file mode 100644
index 00000000..7cb65a69
--- /dev/null
+++ b/test/asortsymtab.awk
@@ -0,0 +1,10 @@
+BEGIN {
+ asort(SYMTAB, arr)
+ for (idx in arr) {
+ print idx
+ }
+ asort(FUNCTAB, arr)
+ for (idx in arr) {
+ print idx
+ }
+}
diff --git a/test/asortsymtab.ok b/test/asortsymtab.ok
new file mode 100644
index 00000000..9b4799bf
--- /dev/null
+++ b/test/asortsymtab.ok
@@ -0,0 +1,72 @@
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42