aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2014-11-02 21:34:01 +0200
committerArnold D. Robbins <arnold@skeeve.com>2014-11-02 21:34:01 +0200
commitaf1cce266d1b6c875cf01db6c47ada89cbf64411 (patch)
tree11e7ad37eda1a0d73ec9321af585228a69bdfae1 /test
parent99d0b82fbf3ff42019fadef5fbb396551aa20070 (diff)
parentc5227d1685aa158e63d4b6a6289063ae985673c1 (diff)
downloadegawk-af1cce266d1b6c875cf01db6c47ada89cbf64411.tar.gz
egawk-af1cce266d1b6c875cf01db6c47ada89cbf64411.tar.bz2
egawk-af1cce266d1b6c875cf01db6c47ada89cbf64411.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog6
-rw-r--r--test/Makefile.am12
-rw-r--r--test/Makefile.in12
-rw-r--r--test/profile7.awk12
-rw-r--r--test/profile7.ok15
5 files changed, 53 insertions, 4 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index b50b5612..9d49a888 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-02 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am (profile7): New test.
+ (profile6): Add missing @ in front of gawk run.
+ * profile7.awk, profile7.ok: New files.
+
2014-11-01 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (profile6): Actually run profiling. Should make test
diff --git a/test/Makefile.am b/test/Makefile.am
index 447a89db..db1cb086 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -708,6 +708,8 @@ EXTRA_DIST = \
profile5.ok \
profile6.awk \
profile6.ok \
+ profile7.awk \
+ profile7.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1021,7 +1023,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 profile6 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -1704,7 +1706,13 @@ profile5:
profile6:
@echo $@
- $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+profile7:
+ @echo $@
+ @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
@sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
diff --git a/test/Makefile.in b/test/Makefile.in
index 71f0dd60..ab8aebe3 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -954,6 +954,8 @@ EXTRA_DIST = \
profile5.ok \
profile6.awk \
profile6.ok \
+ profile7.awk \
+ profile7.ok \
prt1eval.awk \
prt1eval.ok \
prtoeval.awk \
@@ -1266,7 +1268,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 profile6 pty1 \
+ profile1 profile2 profile3 profile4 profile5 profile6 profile7 pty1 \
rebuf regnul1 regnul2 regx8bit reginttrad reint reint2 rsgetline rsglstdin rsstart1 \
rsstart2 rsstart3 rstest6 shadow sortfor sortu split_after_fpat \
splitarg4 strftime \
@@ -2128,7 +2130,13 @@ profile5:
profile6:
@echo $@
- $(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
+ @sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
+ @-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
+
+profile7:
+ @echo $@
+ @$(AWK) --profile=ap-$@.out -f "$(srcdir)"/$@.awk > /dev/null
@sed 1,2d < ap-$@.out > _$@; rm ap-$@.out
@-$(CMP) "$(srcdir)"/$@.ok _$@ && rm -f _$@
diff --git a/test/profile7.awk b/test/profile7.awk
new file mode 100644
index 00000000..454694f9
--- /dev/null
+++ b/test/profile7.awk
@@ -0,0 +1,12 @@
+BEGIN {
+ print 1 / 10 * 10
+ print 1 / (10 * 10)
+ print 1 % 10 * 10
+ print 1 % (10 * 10)
+ print (10 * 5) / 2
+ print 10 * (5 / 2)
+ a = 5
+ b = 3
+ print a - 1 - b
+ print a + 1 - b
+}
diff --git a/test/profile7.ok b/test/profile7.ok
new file mode 100644
index 00000000..d65afa86
--- /dev/null
+++ b/test/profile7.ok
@@ -0,0 +1,15 @@
+ # BEGIN rule(s)
+
+ BEGIN {
+ 1 print 1 / 10 * 10
+ 1 print 1 / (10 * 10)
+ 1 print 1 % 10 * 10
+ 1 print 1 % (10 * 10)
+ 1 print 10 * 5 / 2
+ 1 print 10 * 5 / 2
+ 1 a = 5
+ 1 b = 3
+ 1 print a - 1 - b
+ 1 print a + 1 - b
+ }
+