51
51
self.runbzr('diff')
53
53
def test_diff_prefix(self):
54
self.make_example_branch()
55
file('hello', 'wt').write('hello world!\n')
56
out, err = self.runbzr('diff --diff-prefix old/:new/', retcode=1)
57
self.assertEquals(err, '')
58
self.assertEqualDiff(out, '''\
59
=== modified file 'old/hello'
54
"""diff --prefix appends to filenames in output"""
55
self.make_example_branch()
56
file('hello', 'wt').write('hello world!\n')
57
out, err = self.runbzr('diff --prefix old/:new/', retcode=1)
58
self.assertEquals(err, '')
59
self.assertEqualDiff(out, '''\
60
=== modified file 'old/hello'
69
def test_diff_p1(self):
70
"""diff -p1 produces lkml-style diffs"""
71
self.make_example_branch()
72
file('hello', 'wt').write('hello world!\n')
73
out, err = self.runbzr('diff -p1', retcode=1)
74
self.assertEquals(err, '')
75
self.assertEqualDiff(out, '''\
76
=== modified file 'old/hello'
85
def test_diff_p0(self):
86
"""diff -p0 produces diffs with no prefix"""
87
self.make_example_branch()
88
file('hello', 'wt').write('hello world!\n')
89
out, err = self.runbzr('diff -p0', retcode=1)
90
self.assertEquals(err, '')
91
self.assertEqualDiff(out, '''\
92
=== modified file 'hello'