~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2010-06-23 08:19:28 UTC
  • mfrom: (5317 +trunk)
  • mto: (5247.1.11 first-try)
  • mto: This revision was merged to the branch mainline in revision 5326.
  • Revision ID: v.ladeuil+lp@free.fr-20100623081928-z9q18q30oo5as831
Merge bzr.dev into cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004-2010 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib.tests import blackbox
18
 
 
19
 
 
20
 
class TestCatRevision(blackbox.ExternalBase):
 
17
 
 
18
from bzrlib.tests import TestCaseWithTransport
 
19
 
 
20
 
 
21
class TestCatRevision(TestCaseWithTransport):
21
22
 
22
23
    def test_cat_unicode_revision(self):
23
24
        tree = self.make_branch_and_tree('.')
47
48
        finally:
48
49
            r.unlock()
49
50
 
50
 
        self.check_output(revs[1], 'cat-revision a@r-0-1')
51
 
        self.check_output(revs[2], 'cat-revision a@r-0-2')
52
 
        self.check_output(revs[3], 'cat-revision a@r-0-3')
53
 
 
54
 
        self.check_output(revs[1], 'cat-revision -r 1')
55
 
        self.check_output(revs[2], 'cat-revision -r 2')
56
 
        self.check_output(revs[3], 'cat-revision -r 3')
57
 
 
58
 
        self.check_output(revs[1], 'cat-revision -r revid:a@r-0-1')
59
 
        self.check_output(revs[2], 'cat-revision -r revid:a@r-0-2')
60
 
        self.check_output(revs[3], 'cat-revision -r revid:a@r-0-3')
 
51
        for i in [1, 2, 3]:
 
52
            self.assertEqual(revs[i],
 
53
                self.run_bzr('cat-revision -r revid:a@r-0-%d' % i)[0])
 
54
            self.assertEqual(revs[i],
 
55
                self.run_bzr('cat-revision a@r-0-%d' % i)[0])
 
56
            self.assertEqual(revs[i],
 
57
                self.run_bzr('cat-revision -r %d' % i)[0])
61
58
 
62
59
    def test_cat_no_such_revid(self):
63
60
        tree = self.make_branch_and_tree('.')