~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_i18n.py

  • Committer: Vincent Ladeuil
  • Date: 2011-08-12 09:49:24 UTC
  • mfrom: (6015.9.10 2.4)
  • mto: This revision was merged to the branch mainline in revision 6066.
  • Revision ID: v.ladeuil+lp@free.fr-20110812094924-knc5s0g7vs31a2f1
Merge 2.4 into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from bzrlib import i18n, tests
20
20
 
21
21
 
22
 
 
23
 
 
24
22
class ZzzTranslations(object):
25
23
    """Special Zzz translation for debugging i18n stuff.
26
24
 
91
89
    def test_multiline(self):
92
90
        self.assertEqual(u"zz{{spam\nham}}\n\nzz{{eggs\n}}",
93
91
                         i18n.gettext_per_paragraph("spam\nham\n\neggs\n"))
 
92
 
 
93
 
 
94
class TestInstall(tests.TestCase):
 
95
 
 
96
    def test_custom_languages(self):
 
97
        self.addCleanup(i18n.install)
 
98
        i18n.install('nl:fy')
 
99
 
 
100
    def test_no_env_variables(self):
 
101
        self.addCleanup(i18n.install)
 
102
        self.overrideEnv('LANGUAGE', None)
 
103
        self.overrideEnv('LC_ALL', None)
 
104
        self.overrideEnv('LC_MESSAGES', None)
 
105
        self.overrideEnv('LANG', None)
 
106
        i18n.install()