~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
 
22
 
from bzrlib import ignores
23
 
 
24
22
from bzrlib.tests.blackbox import ExternalBase
25
23
 
26
24
 
28
26
        
29
27
    def test_add_reports(self):
30
28
        """add command prints the names of added files."""
31
 
        ignores._set_user_ignores(['./.bazaar'])
32
 
 
33
29
        self.runbzr('init')
34
30
        self.build_tree(['top.txt', 'dir/', 'dir/sub.txt', 'CVS'])
35
31
        self.build_tree_contents([('.bzrignore', 'CVS\n')])
42
38
                           'added dir',
43
39
                           'added dir/sub.txt',
44
40
                           'added top.txt',
45
 
                           'ignored 2 file(s).'],
 
41
                           'ignored 1 file(s).'],
46
42
                          results)
47
43
        out = self.run_bzr_captured(['add', '-v'], retcode=0)[0]
48
44
        results = sorted(out.rstrip('\n').split('\n'))
49
45
        self.assertEquals(['If you wish to add some of these files, please'\
50
46
                           ' add them by name.',
51
 
                           'ignored .bazaar matching "./.bazaar"',
52
47
                           'ignored CVS matching "CVS"'],
53
48
                          results)
54
49
 
66
61
 
67
62
        "bzr add" should add the parent(s) as necessary.
68
63
        """
69
 
        ignores._set_user_ignores(['./.bazaar'])
70
 
 
71
64
        self.runbzr('init')
72
65
        self.build_tree(['inertiatic/', 'inertiatic/esp'])
73
66
        self.assertEquals(self.capture('unknowns'), 'inertiatic\n')
91
84
 
92
85
        "bzr add" should do this happily.
93
86
        """
94
 
        ignores._set_user_ignores(['./.bazaar'])
95
 
 
96
87
        self.runbzr('init')
97
88
        self.build_tree(['inertiatic/', 'inertiatic/esp'])
98
89
        self.assertEquals(self.capture('unknowns'), 'inertiatic\n')
105
96
        """Add in subdirectory should add only things from there down"""
106
97
        from bzrlib.workingtree import WorkingTree
107
98
 
108
 
        ignores._set_user_ignores(['./.bazaar'])
109
99
        eq = self.assertEqual
110
100
        ass = self.assertTrue
111
101
        chdir = os.chdir