~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-02-06 23:38:33 UTC
  • mfrom: (6463 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6464.
  • Revision ID: jelmer@samba.org-20120206233833-w0nbclw7d1xj4twj
merge bzr.dev.

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