gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1947-g6602e3


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1947-g6602e3d
Date: Tue, 16 Aug 2016 14:15:03 +0000 (UTC)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  6602e3d0106728ce6d6919e27de943e8d986fdf8 (commit)
      from  ed6a8b0cbdfd4b2231b89bfa420147a88f7312cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=6602e3d0106728ce6d6919e27de943e8d986fdf8

commit 6602e3d0106728ce6d6919e27de943e8d986fdf8
Author: Andrew J. Schorr <address@hidden>
Date:   Tue Aug 16 10:14:32 2016 -0400

    When ARRAYDEBUG is defined, add a test using adump to check the array type.

diff --git a/test/ChangeLog b/test/ChangeLog
index dbac66e..28b15fa 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,12 @@
+2016-08-16         Andrew J. Schorr     <address@hidden>
+
+       * Makefile.am (arrdbg): New test using adump.
+       (ARRAYDEBUG_TESTS): New test group requiring ARRAYDEBUG compilation.
+       (check): Add arraydebug-tests.
+       (arraydebug-tests): Check $(ARRAYDEBUG_TESTS) when compiled with
+       ARRAYDEBUG.
+       * arrdbg.awk: New test using adump to check array type.
+
 2016-08-14         Andrew J. Schorr     <address@hidden>
 
        * intarray.awk, intarray.ok: Updated.
diff --git a/test/Makefile.am b/test/Makefile.am
index 6748545..a0b4f52 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -67,6 +67,7 @@ EXTRA_DIST = \
        arrayref.ok \
        arraysort.awk \
        arraysort.ok \
+       arrdbg.awk \
        arrymem1.awk \
        arrymem1.ok \
        arryref2.awk \
@@ -1224,6 +1225,8 @@ GAWK_EXT_TESTS = \
        timeout \
        watchpoint1
 
+ARRAYDEBUG_TESTS = arrdbg
+
 EXTRA_TESTS = inftest regtest ignrcas3 
 
 INET_TESTS = inetdayu inetdayt inetechu inetecht
@@ -1291,7 +1294,7 @@ check:    msg \
        printlang \
        basic-msg-start  basic           basic-msg-end \
        unix-msg-start   unix-tests      unix-msg-end \
-       extend-msg-start gawk-extensions extend-msg-end \
+       extend-msg-start gawk-extensions arraydebug-tests extend-msg-end \
        machine-msg-start machine-tests machine-msg-end \
        charset-tests-all \
        shlib-msg-start  shlib-tests     shlib-msg-end \
@@ -1333,6 +1336,12 @@ mpfr-tests:
        else $(MAKE) $(MPFR_TESTS) ; \
        fi
 
+arraydebug-tests:
+       @if echo $(CFLAGS) | grep ARRAYDEBUG > /dev/null ; then \
+       $(MAKE) $(ARRAYDEBUG_TESTS) ; \
+       else echo gawk is not compiled to support the array debug tests ; \
+       fi
+
 shlib-tests:
        @if $(AWK) --version | $(AWK) ' /API/ { exit 1 }' ; then \
        echo shlib tests not supported on this system ; \
@@ -2338,6 +2347,12 @@ ignrcas3::
        $(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ ; \
        fi
 
+arrdbg:
+       @echo $@
+       @$(AWK) -v "okfile=$(srcdir)/address@hidden" -f 
"$(srcdir)"/address@hidden | grep array_f >_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ 
"$(srcdir)"/address@hidden
+#      @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ 
"$(srcdir)"/address@hidden || exit 0
+
 # Targets generated for other tests:
 include Maketests
 
diff --git a/test/Makefile.in b/test/Makefile.in
index 8df786d..5731487 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -324,6 +324,7 @@ EXTRA_DIST = \
        arrayref.ok \
        arraysort.awk \
        arraysort.ok \
+       arrdbg.awk \
        arrymem1.awk \
        arrymem1.ok \
        arryref2.awk \
@@ -1480,6 +1481,7 @@ GAWK_EXT_TESTS = \
        timeout \
        watchpoint1
 
+ARRAYDEBUG_TESTS = arrdbg
 EXTRA_TESTS = inftest regtest ignrcas3 
 INET_TESTS = inetdayu inetdayt inetechu inetecht
 MACHINE_TESTS = double1 double2 fmtspcl intformat
@@ -1733,7 +1735,7 @@ check:    msg \
        printlang \
        basic-msg-start  basic           basic-msg-end \
        unix-msg-start   unix-tests      unix-msg-end \
-       extend-msg-start gawk-extensions extend-msg-end \
+       extend-msg-start gawk-extensions arraydebug-tests extend-msg-end \
        machine-msg-start machine-tests machine-msg-end \
        charset-tests-all \
        shlib-msg-start  shlib-tests     shlib-msg-end \
@@ -1775,6 +1777,12 @@ mpfr-tests:
        else $(MAKE) $(MPFR_TESTS) ; \
        fi
 
+arraydebug-tests:
+       @if echo $(CFLAGS) | grep ARRAYDEBUG > /dev/null ; then \
+       $(MAKE) $(ARRAYDEBUG_TESTS) ; \
+       else echo gawk is not compiled to support the array debug tests ; \
+       fi
+
 shlib-tests:
        @if $(AWK) --version | $(AWK) ' /API/ { exit 1 }' ; then \
        echo shlib tests not supported on this system ; \
@@ -2775,6 +2783,11 @@ ignrcas3::
        AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT 
CODE: $$? >>_$@ ; \
        $(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ ; \
        fi
+
+arrdbg:
+       @echo $@
+       @$(AWK) -v "okfile=$(srcdir)/address@hidden" -f 
"$(srcdir)"/address@hidden | grep array_f >_$@
+       @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ 
"$(srcdir)"/address@hidden
 Gt-dummy:
 # file Maketests, generated from Makefile.am by the Gentests program
 addcomma:
@@ -4389,6 +4402,7 @@ time:
        @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
 
 # end of file Maketests
+#      @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@ 
"$(srcdir)"/address@hidden || exit 0
 
 # Targets generated for other tests:
 
diff --git a/test/arrdbg.awk b/test/arrdbg.awk
new file mode 100644
index 0000000..951acb4
--- /dev/null
+++ b/test/arrdbg.awk
@@ -0,0 +1,17 @@
+function check(x, exptype,   f) {
+       f[x]
+       printf "array_f subscript [%s]\n", x
+       printf "array_f subscript [%s]\n", x > okfile
+       adump(f, -1)
+       printf "    array_func: %s_array_func\n", exptype > okfile
+}
+
+BEGIN {
+       check(3.0, "cint")
+       check(-3, "int")
+       check("3.0", "str")
+       split(" 3", f, "|")     # create a maybe_num value
+       check(f[1], "str")
+       check("0", "cint")
+       check("-1", "int")
+}

-----------------------------------------------------------------------

Summary of changes:
 test/ChangeLog   |    9 +++++++++
 test/Makefile.am |   17 ++++++++++++++++-
 test/Makefile.in |   16 +++++++++++++++-
 test/arrdbg.awk  |   17 +++++++++++++++++
 4 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 test/arrdbg.awk


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]