~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/shelf_tests.py

  • Committer: Aaron Bentley
  • Date: 2007-06-12 22:09:44 UTC
  • mfrom: (540.1.2 bzrtools-0.17)
  • Revision ID: aaron.bentley@utoronto.ca-20070612220944-5zw4hlzp1ctq6mkl
Merge fixes from 0.17

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    UnshelveHunkSelector,
8
8
    )
9
9
from bzrlib.plugins.bzrtools.errors import NoColor
 
10
from bzrlib.plugins.bzrtools import cmd_shelf
10
11
 
11
12
 
12
13
class ShelfTests(bzrlib.tests.TestCaseWithTransport):
16
17
    DIFF_1 = """--- %(filename)s\t%(old_date)s
17
18
+++ %(filename)s\t%(new_date)s
18
19
@@ -1,4 +1,4 @@
19
 
 
20
 
 
 
20
 
 
21
 
21
22
-hello test world
22
23
+goodbye test world
23
 
 
 
24
 
24
25
"""
25
26
    DIFF_2 = """--- test_file\t%(old_date)s
26
27
+++ test_file\t%(new_date)s
27
28
@@ -1,4 +1,4 @@
28
 
 
29
 
 
 
29
 
 
30
 
30
31
-goodbye test world
31
32
+hello test world
32
 
 
 
33
 
33
34
"""
34
35
    def _check_diff(self, diff=DIFF_1, filename='test_file'):
35
36
        old_tree = self.tree.basis_tree()
616
617
                                               '--no-color'])
617
618
        stdout, error = self.run_bzr_captured(['unshelve', '--all',
618
619
                                               '--no-color'])
 
620
 
 
621
    def test_shelf_help(self):
 
622
        self.assertContainsRe(cmd_shelf().help(),
 
623
                              'list\n.*List the patches on the current shelf')