diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-04-28 15:18:01 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-10 15:20:49 +0200 |
commit | 6bbb4ef39989ff75167da48faec581b55ba51240 (patch) | |
tree | e6428733ee33acbb77793322001c0cd8d33976f0 | |
parent | a406fcb6cacdc49ce11fc6147df58c0c827a7a06 (diff) |
test: test utf-8 for labels in wallet
-rwxr-xr-x | qa/rpc-tests/wallet.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/qa/rpc-tests/wallet.py b/qa/rpc-tests/wallet.py index 9dda712f4f..ba84f0d568 100755 --- a/qa/rpc-tests/wallet.py +++ b/qa/rpc-tests/wallet.py @@ -314,6 +314,20 @@ class WalletTest (BitcoinTestFramework): balance_nodes = [self.nodes[i].getbalance() for i in range(3)] block_count = self.nodes[0].getblockcount() + # Check modes: + # - True: unicode escaped as \u.... + # - False: unicode directly as UTF-8 + for mode in [True, False]: + self.nodes[0].ensure_ascii = mode + # unicode check: Basic Multilingual Plane, Supplementary Plane respectively + for s in [u'рыба', u'𝅘𝅥𝅯']: + addr = self.nodes[0].getaccountaddress(s) + label = self.nodes[0].getaccount(addr) + assert_equal(label, s) + assert(s in self.nodes[0].listaccounts().keys()) + self.nodes[0].ensure_ascii = True # restore to default + + # maintenance tests maintenance = [ '-rescan', '-reindex', |