From 58431879b19a1b1cd5ff3a6575be07c46c73db39 Mon Sep 17 00:00:00 2001 From: "Andrew J. Schorr" Date: Mon, 27 Sep 2021 10:26:15 -0400 Subject: Patch ord function to avoid returning negative values. --- test/ChangeLog | 4 ++++ test/ordchr.awk | 1 + test/ordchr.ok | 1 + 3 files changed, 6 insertions(+) (limited to 'test') 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 + + * ordchr.awk, ordchr.awk: Add test for ord signedness. + 2021-09-19 Arnold D. Robbins * 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 -- cgit v1.2.3