aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2018-11-24 19:47:40 +0200
committerArnold D. Robbins <arnold@skeeve.com>2018-11-24 19:47:40 +0200
commitac2ff45364ab20c1a2bc82f779738f33f90808dd (patch)
tree71c475aa904d013806467e1057cb7f0f5735b38e /test
parentf1a8065d2b258eb223dc31c7700fb83266d8ddbc (diff)
parent2e1281063c92115a8da96906aab6e2be0e9dd78d (diff)
downloadegawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.tar.gz
egawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.tar.bz2
egawk-ac2ff45364ab20c1a2bc82f779738f33f90808dd.zip
Merge branch 'gawk-4.2-stable'
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog11
-rw-r--r--test/Makefile.am15
-rw-r--r--test/Makefile.in18
-rw-r--r--test/Maketests5
-rw-r--r--test/spacere.awk2
-rw-r--r--test/typedregex4.awk7
-rw-r--r--test/typedregex4.ok2
7 files changed, 47 insertions, 13 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index a331619e..36599fdd 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,14 @@
+2018-11-24 Arnold D. Robbins <arnold@skeeve.com>
+
+ * spacere.awk: Move setting of LC_ALL=C out to ...
+ * Makefile.am (spacere): ... here. Added test.
+ Per request from Eli Zaretskii to help porting to MinGW.
+
+ Unrelated:
+
+ * Makefile.am (EXTRA_DIST): New test: typedregex4.
+ * typedregex4.awk, typedregex4.ok: New files.
+
2018-10-10 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (profile1): Add minus to ignore errors on final
diff --git a/test/Makefile.am b/test/Makefile.am
index 171a7620..aa7e6fce 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1176,6 +1176,8 @@ EXTRA_DIST = \
typedregex2.ok \
typedregex3.awk \
typedregex3.ok \
+ typedregex4.awk \
+ typedregex4.ok \
typeof1.awk \
typeof1.ok \
typeof2.awk \
@@ -1311,7 +1313,8 @@ GAWK_EXT_TESTS = \
shadow shadowbuiltin sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld strtonum strtonum1 switch2 symtab1 symtab2 \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
- typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
+ typedregex1 typedregex2 typedregex3 typedregex4 \
+ typeof1 typeof2 typeof3 typeof4 \
typeof5 timeout \
watchpoint1
@@ -2215,6 +2218,16 @@ longwrds:
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+spacere:
+ @echo $@
+ @LC_ALL=C AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+typedregex4:
+ @echo $@
+ @$(AWK) -v x=@/foo/ -f "$(srcdir)"/$@.awk y=@/bar/ /dev/null >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
# Targets generated for other tests:
include Maketests
diff --git a/test/Makefile.in b/test/Makefile.in
index 74e8b3d2..ccab8144 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1569,7 +1569,8 @@ GAWK_EXT_TESTS = \
shadow shadowbuiltin sortfor sortfor2 sortu sourcesplit split_after_fpat \
splitarg4 strftime strftfld strtonum strtonum1 switch2 symtab1 symtab2 \
symtab3 symtab4 symtab5 symtab6 symtab7 symtab8 symtab9 symtab10 \
- typedregex1 typedregex2 typedregex3 typeof1 typeof2 typeof3 typeof4 \
+ typedregex1 typedregex2 typedregex3 typedregex4 \
+ typeof1 typeof2 typeof3 typeof4 \
typeof5 timeout \
watchpoint1
@@ -2658,6 +2659,16 @@ longwrds:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk -v SORT="$(SORT)" < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+spacere:
+ @echo $@
+ @LC_ALL=C AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+typedregex4:
+ @echo $@
+ @$(AWK) -v x=@/foo/ -f "$(srcdir)"/$@.awk y=@/bar/ /dev/null >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
Gt-dummy:
# file Maketests, generated from Makefile.am by the Gentests program
addcomma:
@@ -3661,11 +3672,6 @@ sortglos:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-spacere:
- @echo $@
- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
splitargv:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index fd6a2713..65f0197c 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -1001,11 +1001,6 @@ sortglos:
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-spacere:
- @echo $@
- @AWKPATH="$(srcdir)" $(AWK) -f $@.awk >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
-
splitargv:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f $@.awk < "$(srcdir)"/$@.in >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/spacere.awk b/test/spacere.awk
index 6aa87d2e..ba959309 100644
--- a/test/spacere.awk
+++ b/test/spacere.awk
@@ -8,7 +8,7 @@ BEGIN {
c["\t"] = "\\t"
c["\v"] = "\\v"
- sort = "LC_ALL=C sort"
+ sort = "sort"
for (i in c)
printf("%s %s [[:space:]]\n", c[i],
diff --git a/test/typedregex4.awk b/test/typedregex4.awk
new file mode 100644
index 00000000..8e866c34
--- /dev/null
+++ b/test/typedregex4.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ print "typeof(x) =", typeof(x)
+}
+
+END {
+ print "typeof(y) =", typeof(y)
+}
diff --git a/test/typedregex4.ok b/test/typedregex4.ok
new file mode 100644
index 00000000..6656b61f
--- /dev/null
+++ b/test/typedregex4.ok
@@ -0,0 +1,2 @@
+typeof(x) = regexp
+typeof(y) = regexp