~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_i18n.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-07-15 01:05:56 UTC
  • mfrom: (6025.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20110715010556-ed5ksz52tkean7oa
(jelmer) Fix i18n installation when no language environment variables are
 set. (Jelmer Vernooij)

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()