82
82
output = self.run_bzr_captured(['diff', '-r', 'branch:branch2',
85
self.assertEquals(("=== modified file 'a/file'\n"
85
self.assertEquals(("=== modified file 'file'\n"
88
88
"@@ -1,1 +1,1 @@\n"
90
90
"+contents of branch1/file\n"
92
92
output = self.run_bzr_captured(['diff', 'branch2', 'branch1'],
94
self.assertEqualDiff(("=== modified file 'a/file'\n"
94
self.assertEqualDiff(("=== modified file 'file'\n"
97
97
"@@ -1,1 +1,1 @@\n"
99
99
"+contents of branch1/file\n"
144
144
super(TestDiffLabels, self).make_example_branch()
145
145
self.runbzr('remove hello')
146
146
diff = self.run_bzr_captured(['diff'], retcode=1)
147
self.assertTrue("=== removed file 'a/hello'" in diff[0])
147
self.assertTrue("=== removed file 'hello'" in diff[0])
149
149
def test_diff_label_added(self):
150
150
super(TestDiffLabels, self).make_example_branch()
151
151
file('barbar', 'wt').write('barbar')
152
152
self.runbzr('add barbar')
153
153
diff = self.run_bzr_captured(['diff'], retcode=1)
154
self.assertTrue("=== added file 'b/barbar'" in diff[0])
154
self.assertTrue("=== added file 'barbar'" in diff[0])
156
156
def test_diff_label_modified(self):
157
157
super(TestDiffLabels, self).make_example_branch()
158
158
file('hello', 'wt').write('barbar')
159
159
diff = self.run_bzr_captured(['diff'], retcode=1)
160
self.assertTrue("=== modified file 'a/hello'" in diff[0])
160
self.assertTrue("=== modified file 'hello'" in diff[0])
162
162
def test_diff_label_renamed(self):
163
163
super(TestDiffLabels, self).make_example_branch()
164
164
self.runbzr('rename hello gruezi')
165
165
diff = self.run_bzr_captured(['diff'], retcode=1)
166
self.assertTrue("=== renamed file 'a/hello' => 'b/gruezi'" in diff[0])
166
self.assertTrue("=== renamed file 'hello' => 'gruezi'" in diff[0])