/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 bzrlib/tests/tree_implementations/test_tree.py

  • Committer: Aaron Bentley
  • Date: 2008-10-28 09:16:22 UTC
  • mto: This revision was merged to the branch mainline in revision 3803.
  • Revision ID: aaron@aaronbentley.com-20081028091622-miko3pr4fwpscj1t
Use file.readlines on working trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        # test read by path
184
184
        self.assertEqual(['foobar\n'], tree.get_file_lines('a-id', path='a'))
185
185
 
 
186
    def test_get_file_lines_multi_line_breaks(self):
 
187
        work_tree = self.make_branch_and_tree('wt')
 
188
        self.build_tree_contents([('wt/foobar', 'a\rb\nc\r\nd')])
 
189
        work_tree.add('foobar', 'foobar-id')
 
190
        tree = self._convert_tree(work_tree)
 
191
        tree.lock_read()
 
192
        self.addCleanup(tree.unlock)
 
193
        self.assertEqual(['a\rb\n', 'c\r\n', 'd'],
 
194
                         tree.get_file_lines('foobar-id'))
 
195
 
 
196
 
186
197
class TestExtractFilesBytes(TestCaseWithTree):
187
198
 
188
199
    def test_iter_files_bytes(self):