~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: 2011-01-11 15:45:55 UTC
  • mfrom: (5588.1.1 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20110111154555-xmu386vs0qoigyhl
(vila) Document the packaging helper scripts. (Max Bowsher)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from bzrlib.tests import (
27
27
    script,
28
28
    )
29
 
 
30
 
 
31
 
def load_tests(standard_tests, module, loader):
32
 
    """Parameterize tests for view-aware vs not."""
33
 
    to_adapt, result = tests.split_suite_by_condition(
34
 
        standard_tests, tests.condition_isinstance(TestAdd))
 
29
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
30
 
 
31
 
 
32
load_tests = load_tests_apply_scenarios
 
33
 
 
34
 
 
35
class TestAdd(tests.TestCaseWithTransport):
 
36
 
35
37
    scenarios = [
36
38
        ('pre-views', {'branch_tree_format': 'pack-0.92'}),
37
 
        ('view-aware', {'branch_tree_format': 'development6-rich-root'}),
 
39
        ('view-aware', {'branch_tree_format': '2a'}),
38
40
        ]
39
 
    return tests.multiply_tests(to_adapt, scenarios, result)
40
 
 
41
 
 
42
 
class TestAdd(tests.TestCaseWithTransport):
43
41
 
44
42
    def make_branch_and_tree(self, dir):
45
43
        return super(TestAdd, self).make_branch_and_tree(
231
229
        $ bzr add tree1/a tree2/b
232
230
        2>bzr: ERROR: Path "...tree2/b" is not a child of path "...tree1"
233
231
        ''')
 
232
 
 
233
    def test_add_multiple_files_in_unicode_cwd(self):
 
234
        """Adding multiple files in a non-ascii cwd, see lp:686611"""
 
235
        self.requireFeature(tests.UnicodeFilename)
 
236
        self.make_branch_and_tree(u"\xA7")
 
237
        self.build_tree([u"\xA7/a", u"\xA7/b"])
 
238
        out, err = self.run_bzr(["add", "a", "b"], working_dir=u"\xA7")
 
239
        self.assertEquals(out, "adding a\n" "adding b\n")
 
240
        self.assertEquals(err, "")