~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
        def bzr(*args, **kwargs):
32
32
            return self.run_bzr(*args, **kwargs)[0]
33
33
 
 
34
        os.mkdir('branch')
 
35
        os.chdir('branch')
34
36
        bzr('init')
35
37
        open('a', 'wb').write('foo\n')
36
38
        bzr('add', 'a')
51
53
        rev_id = bzr('revision-history').strip().split('\n')[-1]
52
54
 
53
55
        self.assertEquals(bzr('cat', 'a', '-r', 'revid:%s' % rev_id), 'baz\n')
54
 
 
 
56
        
 
57
        os.chdir('..')
 
58
        
 
59
        self.assertEquals(bzr('cat', 'branch/a', '-r', 'revno:1:branch'),
 
60
                          'foo\n')
 
61
        bzr('cat', 'a', retcode=3)
 
62
        bzr('cat', 'a', '-r', 'revno:1:branch-that-does-not-exist', retcode=3)
 
63