~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to blackbox.py

  • Committer: Aaron Bentley
  • Date: 2005-11-11 17:43:12 UTC
  • Revision ID: aaron.bentley@utoronto.ca-20051111174312-1c627d82a07bf8fd
Added patch for tab-in-patch-filename support

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
from bzrlib.tests.blackbox import ExternalBase
 
1
from bzrlib.selftest.blackbox import ExternalBase
2
2
from unittest import makeSuite
3
3
import os.path
4
4
class TestBzrTools(ExternalBase):
24
24
    def test_shelve(self):
25
25
        self.runbzr('init')
26
26
        self.runbzr('commit -m uc --unchanged')
27
 
        self.runbzr('shelve -r 1 -m foo --all', retcode=3)
28
 
        file('foo', 'wb').write('foo')
29
 
        self.runbzr('add foo')
30
 
        self.runbzr('commit -m foo')
31
 
        self.runbzr('shelve -r 1 -m foo --all', retcode=0)
 
27
        self.runbzr('shelve -r 1 -m foo', retcode=0)
32
28
 
33
29
    def test_fetch_ghosts(self):
34
30
        self.runbzr('init')
35
 
        self.runbzr('fetch-ghosts .')
 
31
        try:
 
32
            self.runbzr('fetch-ghosts .', retcode=1)
 
33
        except AssertionError:
 
34
            self.runbzr('fetch-ghosts .', retcode=3)
36
35
 
37
36
    def test_patch(self):
38
37
        self.runbzr('init')
46
45
        self.runbzr('patch mypatch')
47
46
        assert file('myfile', 'rb').read() == 'goodbye'
48
47
 
49
 
    def test_branch_history(self):
50
 
        self.runbzr('init')
51
 
        file('myfile', 'wb').write('hello')
52
 
        self.runbzr('add')
53
 
        self.runbzr('commit -m hello')
54
 
        self.runbzr('branch-history')
55
 
 
56
 
    def test_branch_history(self):
57
 
        self.runbzr('init')
58
 
        file('myfile', 'wb').write('hello')
59
 
        self.runbzr('add')
60
 
        self.runbzr('commit -m hello')
61
 
        self.runbzr('graph-ancestry . graph.dot')
62
 
        self.runbzr('branch . my_branch')
63
 
        self.runbzr('graph-ancestry . graph.dot --merge-branch my_branch')
64
 
 
65
 
    def test_fetch_ghosts(self):
66
 
        self.runbzr('init')
67
 
        file('myfile', 'wb').write('hello')
68
 
        self.runbzr('add')
69
 
        self.runbzr('commit -m hello')
70
 
        self.runbzr('branch . my_branch')
71
 
        self.runbzr('fetch-ghosts my_branch')
72
 
 
73
 
    def test_zap(self):
74
 
        self.runbzr('init source')
75
 
        self.runbzr('checkout --lightweight source checkout')
76
 
        self.runbzr('zap checkout')
77
 
 
78
48
 
79
49
def test_suite():
80
50
    return makeSuite(TestBzrTools)