diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2022-10-01 20:25:36 +0200 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2022-10-02 10:19:52 +0800 |
commit | 4be0fc082c7d3a03f2b66fa4ffb9dbfb3d606478 (patch) | |
tree | 1aafabcf6096a92701f22b1150859869632e66fa /python | |
parent | cccb827886773066665e99df4a4ecec4ab5bda14 (diff) | |
download | fork-ledger-4be0fc082c7d3a03f2b66fa4ffb9dbfb3d606478.tar.gz fork-ledger-4be0fc082c7d3a03f2b66fa4ffb9dbfb3d606478.tar.bz2 fork-ledger-4be0fc082c7d3a03f2b66fa4ffb9dbfb3d606478.zip |
Fix handling of UCS-1 encoded strings
Add test to python/demo.py
Diffstat (limited to 'python')
-rwxr-xr-x | python/demo.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python/demo.py b/python/demo.py index e57af05a..1230e005 100755 --- a/python/demo.py +++ b/python/demo.py @@ -58,6 +58,9 @@ usd = comms.find_or_create('$') eur = comms.find_or_create('EUR') xcd = comms.find_or_create('XCD') +# Tests currency symbols encoded with UCS-1. For details see #2132. +xxx = comms.find_or_create('¤') + assert not comms.find('CAD') assert not comms.has_key('CAD') assert not 'CAD' in comms @@ -79,7 +82,7 @@ comms.european_by_default = True # don't need to worry about them, but they'll show up if you examine all the # keys in the commodities dict. -assertEqual([u'', u'$', u'%', u'EUR', u'XCD', u'h', u'm', u's'], +assertEqual([u'', u'$', u'%', u'EUR', u'XCD', u'h', u'm', u's', u'¤'], sorted(comms.keys())) # All the styles of dict iteration are supported: |