summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2022-10-01 20:25:36 +0200
committerMartin Michlmayr <tbm@cyrius.com>2022-10-02 10:19:52 +0800
commit4be0fc082c7d3a03f2b66fa4ffb9dbfb3d606478 (patch)
tree1aafabcf6096a92701f22b1150859869632e66fa /python
parentcccb827886773066665e99df4a4ecec4ab5bda14 (diff)
downloadfork-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-xpython/demo.py5
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: