~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_locale.py

  • Committer: Jelmer Vernooij
  • Date: 2016-04-03 16:32:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6617.
  • Revision ID: jelmer@jelmer.uk-20160403163231-h72bo0uyek2gikw0
Don't put French text in doc/en/user-reference when LANGUAGE=fr_CH.UTF_8.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
                    timestamp=1156451297.96, timezone=0)
42
42
        self.tree = tree
43
43
 
 
44
    def run_log_quiet_long(self, args, env_changes={}):
 
45
        cmd = ['--no-aliases', '--no-plugins', '-Oprogress_bar=none',
 
46
               'log', '-q', '--log-format=long']
 
47
        cmd.extend(args)
 
48
        return self.run_bzr_subprocess(cmd, env_changes=env_changes)
 
49
 
44
50
    def test_log_C(self):
45
51
        self.disable_missing_extensions_warning()
46
 
        # C is not necessarily the default locale, so set both LANG and LC_ALL
47
 
        # explicitly because LC_ALL is preferred on (some?) Linux systems but
48
 
        # only LANG is respected on Windows.
49
 
        out, err = self.run_bzr_subprocess(
50
 
            '--no-aliases --no-plugins log -q --log-format=long tree',
51
 
               env_changes={'LANG': 'C', 'BZR_PROGRESS_BAR':'none',
52
 
                            'LC_ALL': 'C', 'LC_CTYPE':None, 'LANGUAGE':None})
 
52
        out, err = self.run_log_quiet_long(
 
53
            ['tree'],
 
54
            # C is not necessarily the default locale, so set both LANG and
 
55
            # LC_ALL explicitly because LC_ALL is preferred on (some?) Linux
 
56
            # systems but only LANG is respected on Windows.
 
57
            env_changes={'LANG': 'C', 'LC_ALL': 'C', 'LC_CTYPE':None,
 
58
                         'LANGUAGE':None})
53
59
        self.assertEqual('', err)
54
60
        self.assertEqualDiff("""\
55
61
------------------------------------------------------------
62
68
""", out)
63
69
 
64
70
    def test_log_BOGUS(self):
65
 
        out, err = self.run_bzr_subprocess(
66
 
            '--no-aliases --no-plugins log -q --log-format=long tree',
67
 
               env_changes={'LANG':'BOGUS', 'BZR_PROGRESS_BAR':'none',
68
 
                            'LC_ALL':None, 'LC_CTYPE':None, 'LANGUAGE':None})
 
71
        out, err = self.run_log_quiet_long(
 
72
            ['tree'],
 
73
            env_changes={'LANG':'BOGUS', 'LC_ALL':None, 'LC_CTYPE':None,
 
74
                         'LANGUAGE':None})
69
75
        self.assertStartsWith(err, 'bzr: warning: unsupported locale setting')
70
76
        self.assertEqualDiff("""\
71
77
------------------------------------------------------------