/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2009-06-17 02:02:44 UTC
  • mfrom: (4449 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4452.
  • Revision ID: andrew.bennetts@canonical.com-20090617020244-50aantdf95aakvjx
Merge bzr.dev, resolving NEWS conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
import os
21
21
 
 
22
from bzrlib import osutils
22
23
from bzrlib.tests import (
23
24
    condition_isinstance,
24
25
    split_suite_by_condition,
25
26
    multiply_tests,
 
27
    SymlinkFeature
26
28
    )
27
29
from bzrlib.tests.blackbox import ExternalBase
28
30
from bzrlib.tests.test_win32utils import NeedsGlobExpansionFeature
53
55
        out = self.run_bzr('add')[0]
54
56
        # the ordering is not defined at the moment
55
57
        results = sorted(out.rstrip('\n').split('\n'))
56
 
        self.assertEquals(['If you wish to add some of these files, please'\
57
 
                           ' add them by name.',
 
58
        self.assertEquals(['If you wish to add ignored files, '
 
59
                           'please add them explicitly by name. '
 
60
                           '("bzr ignored" gives a list)',
58
61
                           'adding .bzrignore',
59
62
                           'adding dir',
60
63
                           'adding dir/sub.txt',
63
66
                          results)
64
67
        out = self.run_bzr('add -v')[0]
65
68
        results = sorted(out.rstrip('\n').split('\n'))
66
 
        self.assertEquals(['If you wish to add some of these files, please'\
67
 
                           ' add them by name.',
 
69
        self.assertEquals(['If you wish to add ignored files, '\
 
70
                           'please add them explicitly by name. ("bzr ignored" gives a list)',
68
71
                           'ignored CVS matching "CVS"'],
69
72
                          results)
70
73
 
227
230
        self.build_tree([u'\u1234A', u'\u1235A', u'\u1235AA', 'cc'])
228
231
        self.run_bzr(['add', u'\u1234?', u'\u1235*'])
229
232
        self.assertEquals(self.run_bzr('unknowns')[0], 'cc\n')
 
233
 
 
234
    def test_add_via_symlink(self):
 
235
        self.requireFeature(SymlinkFeature)
 
236
        self.make_branch_and_tree('source')
 
237
        self.build_tree(['source/top.txt'])
 
238
        os.symlink('source', 'link')
 
239
        out = self.run_bzr(['add', 'link/top.txt'])[0]
 
240
        self.assertEquals(out, 'adding top.txt\n')
 
241
 
 
242
    def test_add_symlink_to_abspath(self):
 
243
        self.requireFeature(SymlinkFeature)
 
244
        self.make_branch_and_tree('tree')
 
245
        os.symlink(osutils.abspath('target'), 'tree/link')
 
246
        out = self.run_bzr(['add', 'tree/link'])[0]
 
247
        self.assertEquals(out, 'adding link\n')