/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 breezy/tests/blackbox/test_commit.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-12 02:01:00 UTC
  • mfrom: (6805.1.4 unicode-option)
  • Revision ID: jelmer@jelmer.uk-20171112020100-sx781yx88ng0yjwz
merge lp:~jelmer/brz/options-unicode/

Show diffs side-by-side

added added

removed removed

Lines of Context:
533
533
                              'added hello\.txt\n'
534
534
                              'Committed revision 1\.\n')
535
535
 
 
536
    def test_fixes_bug_unicode(self):
 
537
        """commit --fixes=lp:unicode succeeds without output."""
 
538
        tree = self.make_branch_and_tree('tree')
 
539
        self.build_tree(['tree/hello.txt'])
 
540
        tree.add('hello.txt')
 
541
        output, err = self.run_bzr(
 
542
            ['commit', '-m', 'hello',
 
543
             u'--fixes=generic:\u20ac', 'tree/hello.txt'],
 
544
            encoding='utf-8', retcode=3)
 
545
        self.assertEqual(b'', output)
 
546
        self.assertContainsRe(err,
 
547
            b'brz: ERROR: Unrecognized bug generic:\xe2\x82\xac\\. Commit refused.\n')
 
548
 
536
549
    def test_no_bugs_no_properties(self):
537
550
        """If no bugs are fixed, the bugs property is not set.
538
551
 
541
554
        tree = self.make_branch_and_tree('tree')
542
555
        self.build_tree(['tree/hello.txt'])
543
556
        tree.add('hello.txt')
544
 
        self.run_bzr( 'commit -m hello tree/hello.txt')
 
557
        self.run_bzr('commit -m hello tree/hello.txt')
545
558
        # Get the revision properties, ignoring the branch-nick property, which
546
559
        # we don't care about for this test.
547
560
        last_rev = tree.branch.repository.get_revision(tree.last_revision())