~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2010-10-13 00:26:41 UTC
  • mto: This revision was merged to the branch mainline in revision 5498.
  • Revision ID: andrew.bennetts@canonical.com-20101013002641-9tlh9k89mlj1666m
Keep docs-plain working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007, 2009, 2010, 2011 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
26
26
from bzrlib.tests import (
27
27
    script,
28
28
    )
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
 
 
 
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))
37
35
    scenarios = [
38
36
        ('pre-views', {'branch_tree_format': 'pack-0.92'}),
39
 
        ('view-aware', {'branch_tree_format': '2a'}),
 
37
        ('view-aware', {'branch_tree_format': 'development6-rich-root'}),
40
38
        ]
 
39
    return tests.multiply_tests(to_adapt, scenarios, result)
 
40
 
 
41
 
 
42
class TestAdd(tests.TestCaseWithTransport):
41
43
 
42
44
    def make_branch_and_tree(self, dir):
43
45
        return super(TestAdd, self).make_branch_and_tree(
229
231
        $ bzr add tree1/a tree2/b
230
232
        2>bzr: ERROR: Path "...tree2/b" is not a child of path "...tree1"
231
233
        ''')
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, "")