~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Vincent Ladeuil
  • Date: 2017-01-30 14:42:05 UTC
  • mfrom: (6620.1.1 trunk)
  • Revision ID: tarmac-20170130144205-r8fh2xpmiuxyozpv
Merge  2.7 into trunk including fix for bug #1657238 [r=vila]

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')