summaryrefslogtreecommitdiffhomepage
path: root/tests/custom/03_stdlib/27_sprintf
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-03-31 09:30:08 +0200
committerJo-Philipp Wich <jo@mein.io>2022-03-31 09:58:04 +0200
commita37f65471c2b69fa588cbf8e9794ff1fe6d04605 (patch)
treee964e6dd6fd2ff33eaa4dc6164572311fc6468b7 /tests/custom/03_stdlib/27_sprintf
parentaae5312a6f117ebb4e12ae500d8d3001d59d2db3 (diff)
types: fix escape sequence encoding of high byte values in JSON strings
Treat the char value as unsigned when testing its value to yield consistent results on both platforms with signed chars and those with unsigned chars by default (e.g. ARM ones). This also avoids encoding byte values > 127 as \uXXXX escape sequences, potentially breaking the strng contents. Fixes: #62 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/custom/03_stdlib/27_sprintf')
-rw-r--r--tests/custom/03_stdlib/27_sprintf4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/custom/03_stdlib/27_sprintf b/tests/custom/03_stdlib/27_sprintf
index e1a3c5d..5606e9a 100644
--- a/tests/custom/03_stdlib/27_sprintf
+++ b/tests/custom/03_stdlib/27_sprintf
@@ -235,8 +235,8 @@ string value.
"1E-07",
"NAN",
"A",
- "\u00ff",
- "\u00c8",
+ "ÿ",
+ "È",
"\u0000",
"\"Hello\\n\"",
"123",