~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_clean_tree.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-20 12:19:29 UTC
  • mfrom: (6437.23.11 2.5)
  • mto: (6581.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 6582.
  • Revision ID: jelmer@samba.org-20120220121929-7ni2psvjoatm1yp4
Merge bzr/2.5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
 
24
24
from bzrlib import ignores
25
25
from bzrlib.tests import TestCaseWithTransport
 
26
from bzrlib.tests.script import run_script
26
27
 
27
28
 
28
29
class TestBzrTools(TestCaseWithTransport):
88
89
        self.assertPathDoesNotExist('a/unknown')
89
90
        self.assertPathDoesNotExist('a/ignored')
90
91
        self.assertPathExists('a/added')
 
92
 
 
93
    def test_clean_tree_interactive(self):
 
94
        wt = self.make_branch_and_tree('.')
 
95
        self.touch('bar')
 
96
        self.touch('foo')
 
97
        run_script(self, """
 
98
        $ bzr clean-tree
 
99
        bar
 
100
        foo
 
101
        2>Are you sure you wish to delete these? ([y]es, [n]o): no
 
102
        <n
 
103
        Canceled
 
104
        """)
 
105
        self.assertPathExists('bar')
 
106
        self.assertPathExists('foo')
 
107
        run_script(self, """
 
108
        $ bzr clean-tree
 
109
        bar
 
110
        foo
 
111
        2>Are you sure you wish to delete these? ([y]es, [n]o): yes
 
112
        <y
 
113
        2>deleting paths:
 
114
        2>  bar
 
115
        2>  foo
 
116
        """)
 
117
        self.assertPathDoesNotExist('bar')
 
118
        self.assertPathDoesNotExist('foo')