aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2012-05-26 10:44:07 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2012-05-26 10:44:07 -0400
commit62d890d4384a70c7550876c617b3a34e28dab234 (patch)
tree3856ee16d1b365d2810539e78f8f23cbf0a98255 /test
parenteec7101174a3b2807fb282272f75cc13d4b953c3 (diff)
downloadegawk-62d890d4384a70c7550876c617b3a34e28dab234.tar.gz
egawk-62d890d4384a70c7550876c617b3a34e28dab234.tar.bz2
egawk-62d890d4384a70c7550876c617b3a34e28dab234.zip
Install gawkapi.h, fix is_off_limits_var, and enhance ordchr test.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog8
-rw-r--r--test/Makefile.am3
-rw-r--r--test/Makefile.in3
-rw-r--r--test/ordchr.awk5
-rw-r--r--test/ordchr.ok4
5 files changed, 21 insertions, 2 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 563f8e05..6031ca09 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,11 @@
+2012-05-26 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * Makefile.am (readfile): Revert previous patch, and add comment
+ explaining that we need to create readfile.ok on failure so that
+ "make diffout" will work properly.
+ (ordchr.awk, ordchr.ok): Add more tests to catch type conversion
+ problems.
+
2012-05-25 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (readfile): Don't copy the Makefile over readfile.ok
diff --git a/test/Makefile.am b/test/Makefile.am
index ea7e9a9e..c0293ba5 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -1552,10 +1552,11 @@ ordchr2::
@$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# N.B. If the test fails, create readfile.ok so that "make diffout" will work
readfile::
@echo $@
@$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) Makefile _$@ && rm -f _$@
+ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok
include2::
@echo $@
diff --git a/test/Makefile.in b/test/Makefile.in
index 34b7e930..683ba8a9 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -1933,10 +1933,11 @@ ordchr2::
@$(AWK) -l ordchr 'BEGIN {print chr(ord("z"))}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@
+# N.B. If the test fails, create readfile.ok so that "make diffout" will work
readfile::
@echo $@
@$(AWK) -l readfile 'BEGIN {printf "%s", readfile("Makefile")}' >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
- @-$(CMP) Makefile _$@ && rm -f _$@
+ @-$(CMP) Makefile _$@ && rm -f _$@ || cp -p Makefile $@.ok
include2::
@echo $@
diff --git a/test/ordchr.awk b/test/ordchr.awk
index abb793a0..0295105e 100644
--- a/test/ordchr.awk
+++ b/test/ordchr.awk
@@ -2,4 +2,9 @@
BEGIN {
print chr(ord("A"))
+ print chr(ord("0"))
+ print ord(chr(65))
+ # test if type conversion between strings and numbers is working properly
+ print chr(ord(0))
+ print ord(chr("65"))
}
diff --git a/test/ordchr.ok b/test/ordchr.ok
index f70f10e4..86d901e9 100644
--- a/test/ordchr.ok
+++ b/test/ordchr.ok
@@ -1 +1,5 @@
A
+0
+65
+0
+65