Mercurial > babel > mirror
diff babel/messages/tests/pofile.py @ 228:6582494abc36 trunk
Follow-up to [239]: also combine duplicate comments when writing PO files.
author | cmlenz |
---|---|
date | Fri, 20 Jul 2007 16:47:08 +0000 |
parents | fc1f8cd448fc |
children | 51a1f6101fa6 |
line wrap: on
line diff
--- a/babel/messages/tests/pofile.py +++ b/babel/messages/tests/pofile.py @@ -120,6 +120,16 @@ msgid "foo" msgstr ""''', buf.getvalue().strip()) + def test_duplicate_comments(self): + catalog = Catalog() + catalog.add(u'foo', auto_comments=['A comment']) + catalog.add(u'foo', auto_comments=['A comment']) + buf = StringIO() + pofile.write_po(buf, catalog, omit_header=True) + self.assertEqual('''#. A comment +msgid "foo" +msgstr ""''', buf.getvalue().strip()) + def test_wrap_long_lines(self): text = """Here's some text where white space and line breaks matter, and should