summaryrefslogtreecommitdiff
path: root/tests/integration
diff options
context:
space:
mode:
authorYossi Gottlieb <yossigo@gmail.com>2022-03-06 13:02:35 +0200
committerGitHub <noreply@github.com>2022-03-06 13:02:35 +0200
commit6740e1753d4e1d60a70195817c50da7f33d3082c (patch)
tree35312725dcdd1383b7215d570a9d16e5b0d9da7d /tests/integration
parente3ef73dc2a557232c60c732705e8e6ff2050eba9 (diff)
downloadredis-6740e1753d4e1d60a70195817c50da7f33d3082c.tar.gz
Fix redis-cli test issues on tcl8.5. (#10386)
Apparently using `\x` produces different results between tclsh 8.5 and 8.6, whereas `\u` is more consistent.
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/redis-cli.tcl6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/redis-cli.tcl b/tests/integration/redis-cli.tcl
index c26722961..7479ac8b4 100644
--- a/tests/integration/redis-cli.tcl
+++ b/tests/integration/redis-cli.tcl
@@ -235,10 +235,10 @@ start_server {tags {"cli"}} {
set escaped_reverse_solidus \"\\"
assert_equal $escaped_reverse_solidus $escaped_reverse_solidus [run_cli --json hgetall \/]
# non printable (0xF0 in ISO-8859-1, not UTF-8(0xC3 0xB0))
- set eth "\xf0\x65"
+ set eth "\u00f0\u0065"
r hset eth test $eth
assert_equal \"\\xf0e\" [run_cli hget eth test]
- assert_equal \"\xf0e\" [run_cli --json hget eth test]
+ assert_equal \"\u00f0e\" [run_cli --json hget eth test]
assert_equal \"\\\\xf0e\" [run_cli --quoted-json hget eth test]
# control characters
r hset control test "Hello\x00\x01\x02\x03World"
@@ -247,7 +247,7 @@ start_server {tags {"cli"}} {
r hset numkey 1 One
assert_equal \{\"1\":\"One\"\} [run_cli --json hgetall numkey]
# non-string, non-printable keys
- r hset npkey "K\x00\x01ey" "V\x00\x01alue"
+ r hset npkey "K\u0000\u0001ey" "V\u0000\u0001alue"
assert_equal \{\"K\\u0000\\u0001ey\":\"V\\u0000\\u0001alue\"\} [run_cli --json hgetall npkey]
assert_equal \{\"K\\\\x00\\\\x01ey\":\"V\\\\x00\\\\x01alue\"\} [run_cli --quoted-json hgetall npkey]
}