~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Launchpad Translations on behalf of bzr-core
  • Date: 2012-07-21 04:30:31 UTC
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: launchpad_translations_on_behalf_of_bzr-core-20120721043031-pjhomz88j0qw381z
Launchpad automatic translations update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
        self.assertTrue(len(out) > 0)
130
130
        self.assertContainsRe(out, r"(?m)^  Bazaar log file: " + bzr_log)
131
131
        self.assertPathDoesNotExist(default_log)
 
132
 
 
133
    def test_unicode_bzr_log(self):
 
134
        uni_val = u"\xa7"
 
135
        enc = osutils.get_user_encoding()
 
136
        try:
 
137
            str_val = uni_val.encode(enc)
 
138
        except UnicodeEncodeError:
 
139
            self.skip("Test string %r unrepresentable in user encoding %s" % (
 
140
                uni_val, enc))
 
141
        self.overrideEnv('BZR_HOME', self.test_base_dir)
 
142
        self.overrideEnv("BZR_LOG",
 
143
            os.path.join(self.test_base_dir, uni_val).encode(enc))
 
144
        out, err = self.run_bzr_subprocess("version")
 
145
        uni_out = out.decode(enc)
 
146
        self.assertContainsRe(uni_out, u"(?m)^  Bazaar log file: .*/\xa7$")
 
147
 
 
148