Mercurial > babel > mirror
diff babel/messages/tests/pofile.py @ 315:59c7849d8b32 trunk
Fix for #79 (location lines wrapping at hyphens).
author | cmlenz |
---|---|
date | Fri, 01 Feb 2008 15:23:13 +0000 |
parents | 2f6b2b06a428 |
children | 4db404d0c19b c21652a8c728 |
line wrap: on
line diff
--- a/babel/messages/tests/pofile.py +++ b/babel/messages/tests/pofile.py @@ -220,6 +220,21 @@ # #, fuzzy''', '\n'.join(buf.getvalue().splitlines()[:7])) + def test_wrap_locations_with_hyphens(self): + catalog = Catalog() + catalog.add(u'foo', locations=[ + ('doupy/templates/base/navmenu.inc.html.py', 60) + ]) + catalog.add(u'foo', locations=[ + ('doupy/templates/job-offers/helpers.html', 22) + ]) + buf = StringIO() + pofile.write_po(buf, catalog, omit_header=True) + self.assertEqual('''#: doupy/templates/base/navmenu.inc.html.py:60 +#: doupy/templates/job-offers/helpers.html:22 +msgid "foo" +msgstr ""''', buf.getvalue().strip()) + def test_pot_with_translator_comments(self): catalog = Catalog() catalog.add(u'foo', locations=[('main.py', 1)],