~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ian Clatworthy
  • Date: 2010-02-19 03:02:07 UTC
  • mto: (4797.23.1 integration-2.1)
  • mto: This revision was merged to the branch mainline in revision 5055.
  • Revision ID: ian.clatworthy@canonical.com-20100219030207-zpbzx021zavx4sqt
What's New in 2.1 - a summary of changes since 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
27
27
    SymlinkFeature
28
28
    )
29
29
from bzrlib.tests.blackbox import ExternalBase
30
 
from bzrlib.tests.test_win32utils import NeedsGlobExpansionFeature
31
30
 
32
31
 
33
32
def load_tests(standard_tests, module, loader):
55
54
        out = self.run_bzr('add')[0]
56
55
        # the ordering is not defined at the moment
57
56
        results = sorted(out.rstrip('\n').split('\n'))
58
 
        self.assertEquals(['If you wish to add ignored files, '
59
 
                           'please add them explicitly by name. '
60
 
                           '("bzr ignored" gives a list)',
61
 
                           'adding .bzrignore',
 
57
        self.assertEquals(['adding .bzrignore',
62
58
                           'adding dir',
63
59
                           'adding dir/sub.txt',
64
 
                           'adding top.txt',
65
 
                           'ignored 1 file(s).'],
 
60
                           'adding top.txt'],
66
61
                          results)
67
62
        out = self.run_bzr('add -v')[0]
68
63
        results = sorted(out.rstrip('\n').split('\n'))
69
 
        self.assertEquals(['If you wish to add ignored files, '\
70
 
                           'please add them explicitly by name. ("bzr ignored" gives a list)',
71
 
                           'ignored CVS matching "CVS"'],
 
64
        self.assertEquals(['ignored CVS matching "CVS"'],
72
65
                          results)
73
66
 
74
67
    def test_add_quiet_is(self):
217
210
        err = self.run_bzr('add .bzr/crescent', retcode=3)[1]
218
211
        self.assertContainsRe(err, r'ERROR:.*\.bzr.*control file')
219
212
 
220
 
    def test_add_with_wildcards(self):
221
 
        self.requireFeature(NeedsGlobExpansionFeature)
222
 
        self.make_branch_and_tree('.')
223
 
        self.build_tree(['a1', 'a2', 'b', 'c33'])
224
 
        self.run_bzr(['add', 'a?', 'c*'])
225
 
        self.assertEquals(self.run_bzr('unknowns')[0], 'b\n')
226
 
 
227
 
    def test_add_with_wildcards_unicode(self):
228
 
        self.requireFeature(NeedsGlobExpansionFeature)
229
 
        self.make_branch_and_tree('.')
230
 
        self.build_tree([u'\u1234A', u'\u1235A', u'\u1235AA', 'cc'])
231
 
        self.run_bzr(['add', u'\u1234?', u'\u1235*'])
232
 
        self.assertEquals(self.run_bzr('unknowns')[0], 'cc\n')
233
 
 
234
213
    def test_add_via_symlink(self):
235
214
        self.requireFeature(SymlinkFeature)
236
215
        self.make_branch_and_tree('source')