~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to tests/blackbox.py

  • Committer: Robert Collins
  • Date: 2006-04-17 11:01:38 UTC
  • mfrom: (362 bzrtools)
  • mto: (364.1.3 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 366.
  • Revision ID: robertc@robertcollins.net-20060417110138-8b47d227583b5b28
mergeĀ fromĀ ab-trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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', retcode=0)
 
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)
28
32
 
29
33
    def test_fetch_ghosts(self):
30
34
        self.runbzr('init')
66
70
        self.runbzr('branch . my_branch')
67
71
        self.runbzr('fetch-ghosts my_branch')
68
72
 
 
73
    def test_zap(self):
 
74
        self.runbzr('init source')
 
75
        self.runbzr('checkout --lightweight source checkout')
 
76
        self.runbzr('zap checkout')
 
77
        self.assertIs(False, os.path.exists('checkout'))
 
78
        self.assertIs(True, os.path.exists('source'))
 
79
 
 
80
    def test_zap_branch(self):
 
81
        self.runbzr('init source')
 
82
        self.runbzr('checkout --lightweight source checkout')
 
83
        self.runbzr('zap --branch checkout')
 
84
        self.assertIs(False, os.path.exists('checkout'))
 
85
        self.assertIs(False, os.path.exists('source'))
 
86
 
 
87
    def test_branches(self):
 
88
        self.runbzr('init source')
 
89
        self.runbzr('init source/subsource')
 
90
        self.runbzr('checkout --lightweight source checkout')
 
91
        self.runbzr('init checkout/subcheckout')
 
92
        self.runbzr('init checkout/.bzr/subcheckout')
 
93
        out = self.capture('branches')
 
94
        lines = out.split('\n')
 
95
        self.assertIs(True, 'source' in lines)
 
96
        self.assertIs(True, 'source/subsource' in lines)
 
97
        self.assertIs(True, 'checkout/subcheckout' in lines)
 
98
        self.assertIs(True, 'checkout' not in lines)
 
99
        self.assertIs(True, 'checkout/.bzr/subcheckout' not in lines)
 
100
 
69
101
def test_suite():
70
102
    return makeSuite(TestBzrTools)