/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/blackbox/test_diff.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-03 13:30:54 UTC
  • mfrom: (1711.7.35 win32)
  • mto: This revision was merged to the branch mainline in revision 1836.
  • Revision ID: john@arbash-meinel.com-20060703133054-308be6e88ef781a9
[merge] win32: all tests now pass

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
    def make_example_branch(test):
38
38
        # FIXME: copied from test_too_much -- share elsewhere?
39
39
        test.runbzr('init')
40
 
        file('hello', 'wt').write('foo\n')
 
40
        file('hello', 'wb').write('foo\n')
41
41
        test.runbzr('add hello')
42
42
        test.runbzr('commit -m setup hello')
43
 
        file('goodbye', 'wt').write('baz\n')
 
43
        file('goodbye', 'wb').write('baz\n')
44
44
        test.runbzr('add goodbye')
45
45
        test.runbzr('commit -m setup goodbye')
46
46
 
60
60
    def test_diff_prefix(self):
61
61
        """diff --prefix appends to filenames in output"""
62
62
        self.make_example_branch()
63
 
        file('hello', 'wt').write('hello world!\n')
 
63
        file('hello', 'wb').write('hello world!\n')
64
64
        out, err = self.runbzr('diff --prefix old/:new/', retcode=1)
65
65
        self.assertEquals(err, '')
66
66
        self.assertEqualDiff(subst_dates(out), '''\
76
76
    def test_diff_p1(self):
77
77
        """diff -p1 produces lkml-style diffs"""
78
78
        self.make_example_branch()
79
 
        file('hello', 'wt').write('hello world!\n')
 
79
        file('hello', 'wb').write('hello world!\n')
80
80
        out, err = self.runbzr('diff -p1', retcode=1)
81
81
        self.assertEquals(err, '')
82
82
        self.assertEqualDiff(subst_dates(out), '''\
92
92
    def test_diff_p0(self):
93
93
        """diff -p0 produces diffs with no prefix"""
94
94
        self.make_example_branch()
95
 
        file('hello', 'wt').write('hello world!\n')
 
95
        file('hello', 'wb').write('hello world!\n')
96
96
        out, err = self.runbzr('diff -p0', retcode=1)
97
97
        self.assertEquals(err, '')
98
98
        self.assertEqualDiff(subst_dates(out), '''\