]> git.ipfire.org Git - thirdparty/babel.git/commitdiff
Extended the doctest to include tests for the fix on [176].
authorPedro Algarvio <pedro@algarvio.me>
Tue, 26 Jun 2007 09:13:08 +0000 (09:13 +0000)
committerPedro Algarvio <pedro@algarvio.me>
Tue, 26 Jun 2007 09:13:08 +0000 (09:13 +0000)
babel/messages/mofile.py

index 04d6df6550ce5749be222d7b70cc104a5836ed24..cb7a262f5fc3c9a6c23c0a71752de0633a1ebefc 100644 (file)
@@ -36,6 +36,7 @@ def write_mo(fileobj, catalog, use_fuzzy=False):
     >>> catalog.add((u'bar', u'baz'), (u'Bahr', u'Batz'))
     >>> catalog.add('fuz', 'Futz', flags=['fuzzy'])
     >>> catalog.add('Fizz', '')
+    >>> catalog.add(('Fuzz', 'Fuzzes'), ('', ''))
     >>> buf = StringIO()
     
     >>> write_mo(buf, catalog)
@@ -51,6 +52,10 @@ def write_mo(fileobj, catalog, use_fuzzy=False):
     u'fuz'
     >>> translations.ugettext('Fizz')
     u'Fizz'
+    >>> translations.ugettext('Fuzz')
+    u'Fuzz'
+    >>> translations.ugettext('Fuzzes')
+    u'Fuzzes'
     
     :param fileobj: the file-like object to write to
     :param catalog: the `Catalog` instance