aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/ChangeLog2
-rw-r--r--test/Makefile.am9
-rw-r--r--test/Makefile.in9
-rw-r--r--test/profile10.awk39
-rw-r--r--test/profile10.ok37
5 files changed, 94 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 7146dbb8..edacd493 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,6 +1,8 @@
2016-03-19 Arnold D. Robbins <arnold@skeeve.com>
* profile5.ok: Adjust after code changes.
+ * Makefile.am (profile10): New test.
+ * profile10.awk, profile10.ok: New files.
2016-02-18 Arnold D. Robbins <arnold@skeeve.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index 2147d34b..776dfbd0 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -778,6 +778,8 @@ EXTRA_DIST = \
profile8.ok \
profile9.awk \
profile9.ok \
+ profile10.awk \
+ profile10.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1134,7 +1136,7 @@ GAWK_EXT_TESTS = \
nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
- profile8 profile9 pty1 \
+ profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
sortfor sortu split_after_fpat \
@@ -1869,6 +1871,11 @@ profile9:
@$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile10:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/Makefile.in b/test/Makefile.in
index 927be043..7c3a5a00 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1035,6 +1035,8 @@ EXTRA_DIST = \
profile8.ok \
profile9.awk \
profile9.ok \
+ profile10.awk \
+ profile10.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1390,7 +1392,7 @@ GAWK_EXT_TESTS = \
nonfatal1 nonfatal2 nonfatal3 \
patsplit posix printfbad1 printfbad2 printfbad3 printfbad4 printhuge procinfs \
profile0 profile1 profile2 profile3 profile4 profile5 profile6 profile7 \
- profile8 profile9 pty1 \
+ profile8 profile9 profile10 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow shadowbuiltin \
sortfor sortu split_after_fpat \
@@ -2308,6 +2310,11 @@ profile9:
@$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile10:
+ @echo $@
+ @$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/profile10.awk b/test/profile10.awk
new file mode 100644
index 00000000..3bb2947d
--- /dev/null
+++ b/test/profile10.awk
@@ -0,0 +1,39 @@
+BEGIN { # Comment 0
+ if (1) { # Comment 1
+ print "ABC" # Comment2
+ } else { # Comment 3
+ print "XYZ" # Comment 4
+ } # Comment 5
+
+ while (c == d) { # Comment 6
+ print "DEF" # Comment 7
+ } # Comment 8
+
+ do { # Comment 9
+ print "GHI" # Comment 10
+ } while (e == f) # Comment 11
+
+ for (i in data) { # Comment 12
+ print "JKL" # Comment 13
+ } # Comment 14
+
+ for (z = 1; z <= 10; z++) { # Comment 15
+ print "MNO" # Comment 16
+ } # Comment 17
+
+ switch (q) { # Comment 18
+ case "a": # Comment 19
+ case "b":
+ # Comment 20
+ break # Comment 21
+ default: # Comment 22
+ break # Comment 23
+ } # Comment 24
+
+ if (1) {
+ print "foo"
+ } # Comment 25
+
+ # Comment 26
+}
+# Comment 27
diff --git a/test/profile10.ok b/test/profile10.ok
new file mode 100644
index 00000000..9d4840c2
--- /dev/null
+++ b/test/profile10.ok
@@ -0,0 +1,37 @@
+BEGIN { # Comment 0
+ if (1) { # Comment 1
+ print "ABC" # Comment2
+ } else { # Comment 3
+ print "XYZ" # Comment 4
+ } # Comment 5
+ while (c == d) { # Comment 6
+ print "DEF" # Comment 7
+ } # Comment 8
+ do { # Comment 9
+ print "GHI" # Comment 10
+ } while (e == f) # Comment 11
+ for (i in data) { # Comment 12
+ print "JKL" # Comment 13
+ } # Comment 14
+ for (z = 1; z <= 10; z++) { # Comment 15
+ print "MNO" # Comment 16
+ } # Comment 17
+ switch (q) {
+ case "a":
+ # Comment 18
+ case "b":
+ # Comment 19
+ break # Comment 20
+ # Comment 21
+ default:
+ # Comment 22
+ break # Comment 23
+ }
+ # Comment 24
+ if (1) {
+ print "foo"
+ } # Comment 25
+ # Comment 26
+}
+
+# Comment 27