-
Notifications
You must be signed in to change notification settings - Fork 552
/
keys
61 lines (52 loc) · 589 Bytes
/
keys
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Tests various keys.
# Keys are case-sensitive.
set a=1
get a
get A
---
a → 1
A → None
set A=2
get a
get A
---
a → 1
A → 2
delete a
delete A
scan
---
ok
# Empty keys and values are valid.
set ""=""
get ""
scan
delete ""
---
→
→
scan
---
ok
# NUL keys and values are valid.
set "\0"="\0"
get "\0"
scan
delete "\0"
---
\x00 → \x00
\x00 → \x00
scan
---
ok
# Unicode keys and values work, but are shown as raw UTF-8 bytes.
set "👋"="👋"
get "👋"
scan
delete "👋"
---
\xf0\x9f\x91\x8b → \xf0\x9f\x91\x8b
\xf0\x9f\x91\x8b → \xf0\x9f\x91\x8b
scan
---
ok