~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-04-09 20:23:07 UTC
  • mfrom: (4265.1.4 bbc-merge)
  • Revision ID: pqm@pqm.ubuntu.com-20090409202307-n0depb16qepoe21o
(jam) Change _fetch_uses_deltas = False for CHK repos until we can
        write a better fix.

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