~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/blackbox/__init__.py

[merge] bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
369
369
        self.runbzr('diff')
370
370
 
371
371
    def test_diff_branches(self):
372
 
        self.build_tree(['branch1/', 'branch1/file', 'branch2/'])
 
372
        self.build_tree(['branch1/', 'branch1/file', 'branch2/'], line_endings='binary')
373
373
        branch = Branch.initialize('branch1')
374
374
        branch.add(['file'])
375
375
        branch.working_tree().commit('add file')
376
376
        copy_branch(branch, 'branch2')
377
 
        print >> open('branch2/file', 'w'), 'new content'
 
377
        print >> open('branch2/file', 'wb'), 'new content'
378
378
        branch2 = Branch.open('branch2')
379
379
        branch2.working_tree().commit('update file')
380
380
        # should open branch1 and diff against branch2, 
546
546
        self.runbzr('pull ../b')
547
547
        self.runbzr('pull ../b')
548
548
 
 
549
    def test_inventory(self):
 
550
        bzr = self.runbzr
 
551
        def output_equals(value, *args):
 
552
            out = self.runbzr(['inventory'] + list(args), backtick=True)
 
553
            self.assertEquals(out, value)
 
554
 
 
555
        bzr('init')
 
556
        open('a', 'wb').write('hello\n')
 
557
        os.mkdir('b')
 
558
 
 
559
        bzr('add a b')
 
560
        bzr('commit -m add')
 
561
 
 
562
        output_equals('a\n', '--kind', 'file')
 
563
        output_equals('b\n', '--kind', 'directory')        
 
564
 
549
565
    def test_ls(self):
550
566
        """Test the abilities of 'bzr ls'"""
551
567
        bzr = self.runbzr