Mercurial > babel > old > mirror
changeset 445:3474ffd631e6
Add a test for a locale with one plural form.
author | jruigrok |
---|---|
date | Fri, 19 Feb 2010 13:38:24 +0000 |
parents | 865b13853345 |
children | 99f5a4551ba8 |
files | babel/messages/tests/pofile.py |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/babel/messages/tests/pofile.py +++ b/babel/messages/tests/pofile.py @@ -190,6 +190,16 @@ pofile.write_po(out_buf, catalog, omit_header=True) assert out_buf.getvalue().strip() == buf.getvalue().strip(), out_buf.getvalue() + def test_single_plural_form(self): + buf = StringIO(r'''msgid "foo" +msgid_plural "foo" +msgstr[0] "Voh"''') + catalog = pofile.read_po(buf, locale='ja_JP') + self.assertEqual(1, len(catalog)) + self.assertEqual(1, catalog.num_plurals) + message = catalog['foo'] + self.assertEqual(1, len(message.string)) + def test_singular_plural_form(self): buf = StringIO(r'''msgid "foo" msgid_plural "foo"