~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-06-11 05:22:11 UTC
  • mfrom: (4427.1.2 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090611052211-b6b2pu471mdja7zz
(igc) fix branch & status content filtering issues

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 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
30
31
 
31
32
 
32
33
def load_tests(standard_tests, module, loader):
54
55
        out = self.run_bzr('add')[0]
55
56
        # the ordering is not defined at the moment
56
57
        results = sorted(out.rstrip('\n').split('\n'))
57
 
        self.assertEquals(['adding .bzrignore',
 
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',
58
62
                           'adding dir',
59
63
                           'adding dir/sub.txt',
60
 
                           'adding top.txt'],
 
64
                           'adding top.txt',
 
65
                           'ignored 1 file(s).'],
61
66
                          results)
62
67
        out = self.run_bzr('add -v')[0]
63
68
        results = sorted(out.rstrip('\n').split('\n'))
64
 
        self.assertEquals(['ignored CVS matching "CVS"'],
 
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"'],
65
72
                          results)
66
73
 
67
74
    def test_add_quiet_is(self):
210
217
        err = self.run_bzr('add .bzr/crescent', retcode=3)[1]
211
218
        self.assertContainsRe(err, r'ERROR:.*\.bzr.*control file')
212
219
 
 
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
 
213
234
    def test_add_via_symlink(self):
214
235
        self.requireFeature(SymlinkFeature)
215
236
        self.make_branch_and_tree('source')