aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog5
-rw-r--r--test/Makefile.am10
-rw-r--r--test/Makefile.in10
-rw-r--r--test/profile6.awk7
-rw-r--r--test/profile6.ok10
5 files changed, 40 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index a9386634..614dc1d0 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2014-10-30 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (profile6): New test.
+ * profile6.awk, profile6.ok: New files.
+
2014-10-17 Andrew J. Schorr <aschorr@telemetry-investments.com>
* Makefile.am (profile1, testext): Use explicit ./foo.awk to avoid
diff --git a/test/Makefile.am b/test/Makefile.am
index aae27832..5f2b4c67 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -706,6 +706,8 @@ EXTRA_DIST = \
profile4.ok \
profile5.awk \
profile5.ok \
+ profile6.awk \
+ profile6.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1019,7 +1021,7 @@ GAWK_EXT_TESTS = \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \
- profile1 profile2 profile3 profile4 profile5 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -1700,6 +1702,12 @@ profile5:
@$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile6:
+ @echo $@
+ @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @-$(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 9d264be2..c7a14fcf 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -952,6 +952,8 @@ EXTRA_DIST = \
profile4.ok \
profile5.awk \
profile5.ok \
+ profile6.awk \
+ profile6.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1264,7 +1266,7 @@ GAWK_EXT_TESTS = \
manyfiles match1 match2 match3 mbstr1 \
nastyparm next nondec nondec2 \
patsplit posix printfbad1 printfbad2 printfbad3 printhuge procinfs \
- profile1 profile2 profile3 profile4 profile5 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -2124,6 +2126,12 @@ profile5:
@$(AWK) --pretty-print=_$@ -f "$(srcdir)"/$@.awk > /dev/null
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+profile6:
+ @echo $@
+ @GAWK_NO_PP_RUN=1 $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
posix2008sub:
@echo $@
@$(AWK) --posix -f "$(srcdir)"/$@.awk > _$@ 2>&1
diff --git a/test/profile6.awk b/test/profile6.awk
new file mode 100644
index 00000000..754f8ae6
--- /dev/null
+++ b/test/profile6.awk
@@ -0,0 +1,7 @@
+BEGIN {
+ x = 3
+ print -(-x)
+ Q = "|"
+ print -3 Q (-4)
+ print -3 Q (-4) (-5)
+}
diff --git a/test/profile6.ok b/test/profile6.ok
new file mode 100644
index 00000000..86ff68a6
--- /dev/null
+++ b/test/profile6.ok
@@ -0,0 +1,10 @@
+ # BEGIN rule(s)
+
+ BEGIN {
+ x = 3
+ print -(-x)
+ Q = "|"
+ print -3 Q (-4)
+ print -3 Q (-4) (-5)
+ }
+