~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ian Clatworthy
  • Date: 2007-08-29 08:18:22 UTC
  • mfrom: (2625.9.11 116143)
  • mto: This revision was merged to the branch mainline in revision 2766.
  • Revision ID: ian.clatworthy@internode.on.net-20070829081822-yd131m9hl2m53lhk
(Daniel Watkins) fix for commit raising UnicodeError (traceback) if LANG is incorrect

Show diffs side-by-side

added added

removed removed

Lines of Context:
224
224
        self.run_bzr('add foo.c')
225
225
        self.run_bzr('commit -m ""', retcode=3)
226
226
 
 
227
    def test_unsupported_encoding_commit_message(self):
 
228
        tree = self.make_branch_and_tree('.')
 
229
        self.build_tree_contents([('foo.c', 'int main() {}')])
 
230
        tree.add('foo.c')
 
231
        out,err = self.run_bzr_subprocess('commit -m "\xff"', retcode=1,
 
232
                                                    env_changes={'LANG': 'C'})
 
233
        self.assertContainsRe(err, r'bzrlib.errors.BzrError: Parameter.*is '
 
234
                                    'unsupported by the current encoding.')
 
235
 
227
236
    def test_other_branch_commit(self):
228
237
        # this branch is to ensure consistent behaviour, whether we're run
229
238
        # inside a branch, or not.