~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-06-29 03:46:18 UTC
  • mfrom: (1711.2.69 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060629034618-75fa8c0c1b44421e
(bialix) fix non-ascii handling for 'bzr missing'

Show diffs side-by-side

added added

removed removed

Lines of Context:
494
494
        txt = bzr('unknowns')
495
495
        self.assertEqual('', txt)
496
496
 
497
 
 
 
497
    def test_missing(self):
 
498
        bzr = self.run_bzr_decode
 
499
 
 
500
        # create empty tree as reference for missing
 
501
        self.run_bzr('init', 'empty-tree')
 
502
 
 
503
        msg = self.info['message']
 
504
 
 
505
        txt = bzr('missing', 'empty-tree', retcode=1)
 
506
        self.assertNotEqual(-1, txt.find(self.info['committer']))
 
507
        self.assertNotEqual(-1, txt.find(msg))
 
508
 
 
509
        # Make sure missing doesn't fail even if we can't write out
 
510
        txt = bzr('missing', 'empty-tree', encoding='ascii', retcode=1)
 
511
        self.assertEqual(-1, txt.find(msg))
 
512
        self.assertNotEqual(-1, txt.find(msg.encode('ascii', 'replace')))