~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

 * bzr add now lists how many files were ignored per glob.  add --verbose
   lists the specific files.  (Aaron Bentley)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
 
18
# Mr. Smoketoomuch: I'm sorry?
 
19
# Mr. Bounder: You'd better cut down a little then.
 
20
# Mr. Smoketoomuch: Oh, I see! Smoke too much so I'd better cut down a little
 
21
#                   then!
18
22
 
19
23
"""Black-box tests for bzr.
20
24
 
663
667
    def test_add_reports(self):
664
668
        """add command prints the names of added files."""
665
669
        b = Branch.initialize('.')
666
 
        self.build_tree(['top.txt', 'dir/', 'dir/sub.txt'])
 
670
        self.build_tree(['top.txt', 'dir/', 'dir/sub.txt', 'CVS'])
667
671
        out = self.run_bzr_captured(['add'], retcode=0)[0]
668
672
        # the ordering is not defined at the moment
669
673
        results = sorted(out.rstrip('\n').split('\n'))
670
 
        self.assertEquals(['added dir',
 
674
        self.assertEquals(['If you wish to add some of these files, please'\
 
675
                           ' add them by name.',
 
676
                           'added dir',
671
677
                           'added dir'+os.sep+'sub.txt',
672
 
                           'added top.txt',],
 
678
                           'added top.txt',
 
679
                           'ignored 1 file(s) matching "CVS"'],
 
680
                          results)
 
681
        out = self.run_bzr_captured(['add', '-v'], retcode=0)[0]
 
682
        results = sorted(out.rstrip('\n').split('\n'))
 
683
        self.assertEquals(['If you wish to add some of these files, please'\
 
684
                           ' add them by name.',
 
685
                           'ignored CVS matching "CVS"'],
673
686
                          results)
674
687
 
675
688
    def test_add_quiet_is(self):