/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_i18n.py

  • Committer: INADA Naoki
  • Date: 2011-05-27 06:37:07 UTC
  • mto: (5930.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5932.
  • Revision ID: songofacandy@gmail.com-20110527063707-zsdh7gvbgtjlesl1
Add TestGetTextPerParagraph and fix error on TestGetText.test_multiline.

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
                         i18n.gettext("spam ham eggs"))
75
75
 
76
76
    def test_multiline(self):
 
77
        self.assertEqual(u"zz{{spam\nham\n\neggs\n}}",
 
78
                         i18n.gettext("spam\nham\n\neggs\n"))
 
79
 
 
80
 
 
81
class TestGetTextPerParagraph(tests.TestCase):
 
82
 
 
83
    def setUp(self):
 
84
        super(TestGetTextPerParagraph, self).setUp()
 
85
        self.overrideAttr(i18n, '_translation', ZzzTranslations())
 
86
 
 
87
    def test_oneline(self):
 
88
        self.assertEqual(u"zz{{spam ham eggs}}",
 
89
                         i18n.gettext_per_paragraph("spam ham eggs"))
 
90
 
 
91
    def test_multiline(self):
77
92
        self.assertEqual(u"zz{{spam\nham}}\n\nzz{{eggs\n}}",
78
 
                         i18n.gettext("spam\nham\n\neggs\n"))
 
93
                         i18n.gettext_per_paragraph("spam\nham\n\neggs\n"))