[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/improve-tests, updated. gawk-4.1
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/improve-tests, updated. gawk-4.1.0-3068-g64b5960 |
Date: |
Thu, 12 Apr 2018 06:29:11 -0400 (EDT) |
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, feature/improve-tests has been updated
via 64b59606f3a712da1ae852b90b996d3c786267b1 (commit)
from 1ca41a2081895a91bd75d382cafdfde708835d2f (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=64b59606f3a712da1ae852b90b996d3c786267b1
commit 64b59606f3a712da1ae852b90b996d3c786267b1
Author: Arnold D. Robbins <address@hidden>
Date: Thu Apr 12 13:28:53 2018 +0300
Automate --re-interval tests.
diff --git a/test/ChangeLog b/test/ChangeLog
index c46b423..8693672 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,10 @@
+2018-04-12 Arnold D. Robbins <address@hidden>
+
+ * Gentests: Add support tests that need --re-interval.
+ * Makefile.am (NEED_RE_INTERVAL): New list of tests.
+ (NEED_LOCALE_EN): Add reint2 to the list.
+ * gsubtst3.awk, leaddig.awk: Modified to support automating.
+
2018-04-11 Arnold D. Robbins <address@hidden>
* Gentests: Add support for tests that need a specific locale.
diff --git a/test/Gentests b/test/Gentests
index bc9b726..d679817 100755
--- a/test/Gentests
+++ b/test/Gentests
@@ -82,6 +82,13 @@ BEGIN {
next
}
+/^NEED_RE_INTERVAL *=/,/[^\\]$/ {
+ gsub(/(^NEED_RE_INTERVAL *=|\\$)/,"")
+ for (i = 1; i <= NF; i++)
+ re_interval[$i]
+ next
+}
+
/^NEED_TRADITIONAL *=/,/[^\\]$/ {
gsub(/(^NEED_TRADITIONAL *=|\\$)/,"")
for (i = 1; i <= NF; i++)
@@ -203,6 +210,10 @@ function generate(x, s, i, locale_string)
s = s " --non-decimal-data"
delete nondec[x]
}
+ if (x in re_interval) {
+ s = s " --re-interval"
+ delete re_interval[x]
+ }
if (x".in" in files) {
s = s " < \"$(srcdir)\"/address@hidden"
delete files[x".in"]
@@ -263,6 +274,9 @@ END {
if (!(x in targets))
printf "WARNING: --non-decimal-data target `%s' is
missing.\n", x > "/dev/stderr"
+ for (x in re_interval)
+ if (!(x in targets))
+ printf "WARNING: --re-interval target `%s' is
missing.\n", x > "/dev/stderr"
for (x in locale_tests)
for (y in locale_tests[x])
if (!(y in targets))
diff --git a/test/Makefile.am b/test/Makefile.am
index 0075536..0f39152 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1348,6 +1348,9 @@ NEED_POSIX = printf0 posix2008sub paramasfunc1
paramasfunc2 muldimposix
# List of tests that need --pretty-print
NEED_PRETTY = profile4 profile5 profile8 profile9 profile10
+# List of tests that need --re-interval
+NEED_RE_INTEVAL = gsubtst3 reint reint2
+
# List of tests that need --traditional
NEED_TRADITIONAL = litoct tradanch rscompat
@@ -1371,8 +1374,8 @@ NEED_LOCALE_C = \
NEED_LOCALE_EN = \
backbigs1 backsmalls1 backsmalls2 concat4 dfamb1 ignrcas2 lc_num1 \
- mbfw1 mbprintf1 mbprintf3 mbprintf4 mbstr1 mbstr2 printhuge rri1 \
- subamp subi18n wideidx wideidx2 widesub widesub2 widesub3 widesub4
+ mbfw1 mbprintf1 mbprintf3 mbprintf4 mbstr1 mbstr2 printhuge reint2 \
+ rri1 subamp subi18n wideidx wideidx2 widesub widesub2 widesub3 widesub4
# Unused at the moment, since nlstringtest has additional stufff it does
# NEED_LOCALE_FR =
@@ -1672,11 +1675,6 @@ rsglstdin::
@cat "$(srcdir)"/rsgetline.in | AWKPATH="$(srcdir)" $(AWK) -f
rsgetline.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-reint::
- @echo $@
- @$(AWK) --re-interval -f "$(srcdir)"/reint.awk "$(srcdir)"/reint.in
>_$@ || echo EXIT CODE: $$? >> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
pipeio1::
@echo $@
@$(AWK) -f "$(srcdir)"/pipeio1.awk >_$@ || echo EXIT CODE: $$? >> _$@
@@ -1733,16 +1731,6 @@ redfilnm::
@$(AWK) -f "$(srcdir)"/redfilnm.awk srcdir="$(srcdir)"
"$(srcdir)"/redfilnm.in >_$@ || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-leaddig::
- @echo $@
- @$(AWK) -v x=2E -f "$(srcdir)"/leaddig.awk >_$@ || echo EXIT CODE: $$?
>> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-gsubtst3::
- @echo $@
- @$(AWK) --re-interval -f "$(srcdir)"/address@hidden
"$(srcdir)"/address@hidden >_$@ || echo EXIT CODE: $$? >> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
space::
@echo $@
@$(AWK) -f ' ' "$(srcdir)"/space.awk >_$@ 2>&1 || echo EXIT CODE: $$?
>>_$@ || echo EXIT CODE: $$? >> _$@
@@ -1815,12 +1803,6 @@ mixed1::
@$(AWK) -f /dev/null --source 'BEGIN {return junk}' >_$@ 2>&1 || echo
EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-reint2::
- @echo $@
- @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE ; \
- AWKPATH="$(srcdir)" $(AWK) --re-interval -f address@hidden
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
mbprintf5::
@echo $@
@case `uname` in \
diff --git a/test/Makefile.in b/test/Makefile.in
index 3ab18fd..db33f05 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1605,6 +1605,9 @@ NEED_POSIX = printf0 posix2008sub paramasfunc1
paramasfunc2 muldimposix
# List of tests that need --pretty-print
NEED_PRETTY = profile4 profile5 profile8 profile9 profile10
+# List of tests that need --re-interval
+NEED_RE_INTEVAL = gsubtst3 reint reint2
+
# List of tests that need --traditional
NEED_TRADITIONAL = litoct tradanch rscompat
@@ -1630,8 +1633,8 @@ NEED_LOCALE_C = \
NEED_LOCALE_EN = \
backbigs1 backsmalls1 backsmalls2 concat4 dfamb1 ignrcas2 lc_num1 \
- mbfw1 mbprintf1 mbprintf3 mbprintf4 mbstr1 mbstr2 printhuge rri1 \
- subamp subi18n wideidx wideidx2 widesub widesub2 widesub3 widesub4
+ mbfw1 mbprintf1 mbprintf3 mbprintf4 mbstr1 mbstr2 printhuge reint2 \
+ rri1 subamp subi18n wideidx wideidx2 widesub widesub2 widesub3 widesub4
# Unused at the moment, since nlstringtest has additional stufff it does
@@ -2114,11 +2117,6 @@ rsglstdin::
@cat "$(srcdir)"/rsgetline.in | AWKPATH="$(srcdir)" $(AWK) -f
rsgetline.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-reint::
- @echo $@
- @$(AWK) --re-interval -f "$(srcdir)"/reint.awk "$(srcdir)"/reint.in
>_$@ || echo EXIT CODE: $$? >> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
pipeio1::
@echo $@
@$(AWK) -f "$(srcdir)"/pipeio1.awk >_$@ || echo EXIT CODE: $$? >> _$@
@@ -2175,16 +2173,6 @@ redfilnm::
@$(AWK) -f "$(srcdir)"/redfilnm.awk srcdir="$(srcdir)"
"$(srcdir)"/redfilnm.in >_$@ || echo EXIT CODE: $$? >> _$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-leaddig::
- @echo $@
- @$(AWK) -v x=2E -f "$(srcdir)"/leaddig.awk >_$@ || echo EXIT CODE: $$?
>> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
-gsubtst3::
- @echo $@
- @$(AWK) --re-interval -f "$(srcdir)"/address@hidden
"$(srcdir)"/address@hidden >_$@ || echo EXIT CODE: $$? >> _$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
space::
@echo $@
@$(AWK) -f ' ' "$(srcdir)"/space.awk >_$@ 2>&1 || echo EXIT CODE: $$?
>>_$@ || echo EXIT CODE: $$? >> _$@
@@ -2257,12 +2245,6 @@ mixed1::
@$(AWK) -f /dev/null --source 'BEGIN {return junk}' >_$@ 2>&1 || echo
EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-reint2::
- @echo $@
- @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE ; \
- AWKPATH="$(srcdir)" $(AWK) --re-interval -f address@hidden
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
-
mbprintf5::
@echo $@
@case `uname` in \
@@ -3045,6 +3027,11 @@ gsubtst2:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+gsubtst3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
gsubtst4:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@@ -3111,6 +3098,11 @@ iobug1:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+leaddig:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
leadnl:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -4327,6 +4319,17 @@ regx8bit:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+reint:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+reint2:
+ @echo $@
+ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
+ AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
rsgetline:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index 879858f..c9479ad 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -432,6 +432,11 @@ gsubtst2:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+gsubtst3:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
gsubtst4:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@@ -498,6 +503,11 @@ iobug1:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+leaddig:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
leadnl:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@@ -1714,6 +1724,17 @@ regx8bit:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden >_$@ 2>&1 || echo EXIT
CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+reint:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
+reint2:
+ @echo $@
+ @[ -z "$$GAWKLOCALE" ] && GAWKLOCALE=en_US.UTF-8; export GAWKLOCALE; \
+ AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
rsgetline:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/gsubtst3.awk b/test/gsubtst3.awk
index 1c4f4ea..6c51896 100644
--- a/test/gsubtst3.awk
+++ b/test/gsubtst3.awk
@@ -164,7 +164,8 @@ OFS="-"
$(length(_)+1)=""
print $0
-while(getline <ARGV[1]) # ADR: was testre.dat
+#while(getline <ARGV[1]) # ADR: was testre.dat
+while(getline) # ADR: use stdin so can automate generation of test
{
RE=$1;IN=$2;OUT=$3
$0=IN
diff --git a/test/leaddig.awk b/test/leaddig.awk
index 6c001ba..1e6ca51 100644
--- a/test/leaddig.awk
+++ b/test/leaddig.awk
@@ -2,6 +2,11 @@
# right way, based on a note in comp.lang.awk.
#
# run with gawk -v x=2E -f leaddig.awk
+
BEGIN {
+ # 4/2018: Put it into the program to make generation of the
+ # recipe automatable
+ x = "2E"
+
print "x =", x, (x == 2), (x == 2E0), (x == 2E), (x == 2D)
}
-----------------------------------------------------------------------
Summary of changes:
test/ChangeLog | 7 +++++++
test/Gentests | 14 ++++++++++++++
test/Makefile.am | 28 +++++-----------------------
test/Makefile.in | 49 ++++++++++++++++++++++++++-----------------------
test/Maketests | 21 +++++++++++++++++++++
test/gsubtst3.awk | 3 ++-
test/leaddig.awk | 5 +++++
7 files changed, 80 insertions(+), 47 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/improve-tests, updated. gawk-4.1.0-3068-g64b5960,
Arnold Robbins <=