~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merged bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
        try:
74
74
            tree.add(['a-rev-tree', 'c-rev', 'd-rev'])
75
75
            tree.commit('add test files')
 
76
            # remove currently uses self._write_inventory - 
 
77
            # work around that for now.
 
78
            tree.flush()
76
79
            tree.remove(['d-rev'])
77
80
            tree.rename_one('a-rev-tree', 'b-tree')
78
81
            tree.rename_one('c-rev', 'a-rev-tree')
105
108
        url = self.get_readonly_url() + '/README'
106
109
        out, err = self.run_bzr('cat', url)
107
110
        self.assertEqual('contents of README\n', out)
 
111
 
 
112
    def test_cat_no_working_tree(self):
 
113
        wt = self.make_branch_and_tree('.')
 
114
        self.build_tree(['README'])
 
115
        wt.add('README')
 
116
        wt.commit('Making sure there is a basis_tree available')
 
117
        wt.branch.bzrdir.destroy_workingtree()
 
118
 
 
119
        url = self.get_readonly_url() + '/README'
 
120
        out, err = self.run_bzr('cat', url)
 
121
        self.assertEqual('contents of README\n', out)
 
122