~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin
  • Date: 2011-04-15 21:13:48 UTC
  • mto: This revision was merged to the branch mainline in revision 5797.
  • Revision ID: gzlist@googlemail.com-20110415211348-0nyzaywc476oibyr
Remove testing that expected argv decoding to be done outside run_bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
321
321
        tree.add('foo.c')
322
322
        self.run_bzr('commit -m ""', retcode=3)
323
323
 
324
 
    def test_unsupported_encoding_commit_message(self):
325
 
        if sys.platform == 'win32':
326
 
            raise tests.TestNotApplicable('Win32 parses arguments directly'
327
 
                ' as Unicode, so we can\'t pass invalid non-ascii')
328
 
        tree = self.make_branch_and_tree('.')
329
 
        self.build_tree_contents([('foo.c', 'int main() {}')])
330
 
        tree.add('foo.c')
331
 
        # LANG env variable has no effect on Windows
332
 
        # but some characters anyway cannot be represented
333
 
        # in default user encoding
334
 
        char = probe_bad_non_ascii(osutils.get_user_encoding())
335
 
        if char is None:
336
 
            raise TestSkipped('Cannot find suitable non-ascii character'
337
 
                'for user_encoding (%s)' % osutils.get_user_encoding())
338
 
        out,err = self.run_bzr_subprocess('commit -m "%s"' % char,
339
 
                                          retcode=1,
340
 
                                          env_changes={'LANG': 'C'})
341
 
        self.assertContainsRe(err, r'bzrlib.errors.BzrError: Parameter.*is '
342
 
                                    'unsupported by the current encoding.')
343
 
 
344
324
    def test_other_branch_commit(self):
345
325
        # this branch is to ensure consistent behaviour, whether we're run
346
326
        # inside a branch, or not.