~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2012-07-28 15:26:22 UTC
  • mto: This revision was merged to the branch mainline in revision 6546.
  • Revision ID: gzlist@googlemail.com-20120728152622-wkjruul7dtg6c0ts
Add release notes

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
 
 
50
44
    def test_log_C(self):
51
45
        self.disable_missing_extensions_warning()
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})
 
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})
59
53
        self.assertEqual('', err)
60
54
        self.assertEqualDiff("""\
61
55
------------------------------------------------------------
68
62
""", out)
69
63
 
70
64
    def test_log_BOGUS(self):
71
 
        out, err = self.run_log_quiet_long(
72
 
            ['tree'],
73
 
            env_changes={'LANG':'BOGUS', 'LC_ALL':None, 'LC_CTYPE':None,
74
 
                         'LANGUAGE':None})
 
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})
75
69
        self.assertStartsWith(err, 'bzr: warning: unsupported locale setting')
76
70
        self.assertEqualDiff("""\
77
71
------------------------------------------------------------