Skip to content

Commit 6bbb4ef

Browse files
committed
test: test utf-8 for labels in wallet
1 parent a406fcb commit 6bbb4ef

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

qa/rpc-tests/wallet.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,20 @@ def run_test (self):
314314
balance_nodes = [self.nodes[i].getbalance() for i in range(3)]
315315
block_count = self.nodes[0].getblockcount()
316316

317+
# Check modes:
318+
# - True: unicode escaped as \u....
319+
# - False: unicode directly as UTF-8
320+
for mode in [True, False]:
321+
self.nodes[0].ensure_ascii = mode
322+
# unicode check: Basic Multilingual Plane, Supplementary Plane respectively
323+
for s in [u'рыба', u'𝅘𝅥𝅯']:
324+
addr = self.nodes[0].getaccountaddress(s)
325+
label = self.nodes[0].getaccount(addr)
326+
assert_equal(label, s)
327+
assert(s in self.nodes[0].listaccounts().keys())
328+
self.nodes[0].ensure_ascii = True # restore to default
329+
330+
# maintenance tests
317331
maintenance = [
318332
'-rescan',
319333
'-reindex',

0 commit comments

Comments
 (0)