aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2021-09-27 10:26:15 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2021-09-27 10:26:15 -0400
commit58431879b19a1b1cd5ff3a6575be07c46c73db39 (patch)
tree74921c1095e07cc988a54c6ce8c09ac9975f57d7 /test
parentd249840cccab9490a5fd9580ba5aa6181930bca5 (diff)
downloadegawk-58431879b19a1b1cd5ff3a6575be07c46c73db39.tar.gz
egawk-58431879b19a1b1cd5ff3a6575be07c46c73db39.tar.bz2
egawk-58431879b19a1b1cd5ff3a6575be07c46c73db39.zip
Patch ord function to avoid returning negative values.
Diffstat (limited to 'test')
-rw-r--r--test/ChangeLog4
-rw-r--r--test/ordchr.awk1
-rw-r--r--test/ordchr.ok1
3 files changed, 6 insertions, 0 deletions
diff --git a/test/ChangeLog b/test/ChangeLog
index 18025e7b..553ba2b5 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2021-09-27 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * ordchr.awk, ordchr.awk: Add test for ord signedness.
+
2021-09-19 Arnold D. Robbins <arnold@skeeve.com>
* Makefile.am (EXTRA_DIST): Remove commas.in from the list.
diff --git a/test/ordchr.awk b/test/ordchr.awk
index 0295105e..5d6ffe9f 100644
--- a/test/ordchr.awk
+++ b/test/ordchr.awk
@@ -7,4 +7,5 @@ BEGIN {
# test if type conversion between strings and numbers is working properly
print chr(ord(0))
print ord(chr("65"))
+ print ord(chr("159"))
}
diff --git a/test/ordchr.ok b/test/ordchr.ok
index 86d901e9..be3997c6 100644
--- a/test/ordchr.ok
+++ b/test/ordchr.ok
@@ -3,3 +3,4 @@ A
65
0
65
+159