aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2024-08-28 00:03:04 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2024-08-28 00:03:04 +0200
commitfdc185b8faaae44d67f85d2c5a9b9fa48d3e2859 (patch)
tree8a3553c4a1642588f8cdf739f035a99a0467b68e /tests
parent94d12185d873c1808b902e010d305835fbb085f1 (diff)
downloadsciteco-fdc185b8faaae44d67f85d2c5a9b9fa48d3e2859.tar.gz
fixed retrieval of characters with codes larger than 127 - always return unsigned integer
* SCI_GETCHARAT is internally casted to `char`, which may be signed. Characters > 127 therefore become negative and stay so when casted to sptr_t. We therefore cast it back to guchar (unsigned char). * The same is true whenever returning a string's character to SciTECO (teco_int_t) as our string type is `gchar *`. * <^^x> now also works for those characters. Eventually, the parser will probably become UTF8-aware and this will have to be done differently.
Diffstat (limited to 'tests')
-rw-r--r--tests/testsuite.at3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 3965730..6ea95ab 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -81,6 +81,9 @@ AT_CLEANUP
AT_SETUP([8-bit cleanlyness])
AT_CHECK([$SCITECO -e "0:@EUa/f^@^@/ :Qa-4\"N(0/0)' Ga Z= Z-4\"N(0/0)'"], 0, ignore, ignore)
+AT_CHECK([$SCITECO -e "129@I// -A-129\"N(0/0)'"], 0, ignore, ignore)
+AT_CHECK([$SCITECO -e "129@^Ua// 0Qa-129\"N(0/0)'"], 0, ignore, ignore)
+AT_CHECK([$SCITECO -e "@^Ua/^^/ 129:@^Ua// Ma-129\"N(0/0)'"], 0, ignore, ignore)
AT_CLEANUP
AT_SETUP([Automatic EOL normalization])