/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-08-29 09:45:47 UTC
  • mfrom: (2765.1.2 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070829094547-qm9ntd7pd95r7w8c
(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.