~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/shelf_tests.py

  • Committer: Aaron Bentley
  • Date: 2007-06-10 17:55:08 UTC
  • mfrom: (531.2.2 bzrtools)
  • Revision ID: aaron.bentley@utoronto.ca-20070610175508-gex1oxvmfv0qoagi
Merge whitespace cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    DIFF_1 = """--- %(filename)s\t%(old_date)s
18
18
+++ %(filename)s\t%(new_date)s
19
19
@@ -1,4 +1,4 @@
20
 
 
21
 
 
 
20
 
 
21
 
22
22
-hello test world
23
23
+goodbye test world
24
 
 
 
24
 
25
25
"""
26
26
    DIFF_2 = """--- test_file\t%(old_date)s
27
27
+++ test_file\t%(new_date)s
28
28
@@ -1,4 +1,4 @@
29
 
 
30
 
 
 
29
 
 
30
 
31
31
-goodbye test world
32
32
+hello test world
33
 
 
 
33
 
34
34
"""
35
35
    def _check_diff(self, diff=DIFF_1, filename='test_file'):
36
36
        old_tree = self.tree.basis_tree()
45
45
        finally:
46
46
            self.tree.unlock()
47
47
            old_tree.unlock()
48
 
        keys = { 'filename' : filename , 'old_date': old_date, 
 
48
        keys = { 'filename' : filename , 'old_date': old_date,
49
49
                 'new_date': new_date}
50
50
        hdr  = self.DIFF_HEADER % keys
51
51
        diff = diff % keys
613
613
        f = file('test_file', 'wb')
614
614
        f.write(self.MODIFIED)
615
615
        f.close()
616
 
        stdout, error = self.run_bzr_captured(['shelve', '--all', 
 
616
        stdout, error = self.run_bzr_captured(['shelve', '--all',
617
617
                                               '--no-color'])
618
 
        stdout, error = self.run_bzr_captured(['unshelve', '--all', 
 
618
        stdout, error = self.run_bzr_captured(['unshelve', '--all',
619
619
                                               '--no-color'])
620
620
 
621
621
    def test_shelf_help(self):