/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_filesystem_cicp.py

  • Committer: Mark Hammond
  • Date: 2008-12-23 07:21:03 UTC
  • mto: (3932.3.1 cicp-1.11)
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mhammond@skippinet.com.au-20081223072103-vwt8qzlsfrrw8yz5
test for, and fix problem with canonical_relpath when the tail does not exist.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib.tests.blackbox import ExternalBase
23
23
from bzrlib.tests import CaseInsCasePresFilenameFeature, KnownFailure
24
 
from bzrlib.osutils import canonical_relpath
 
24
from bzrlib.osutils import canonical_relpath, pathjoin
25
25
 
26
26
class TestCICPBase(ExternalBase):
27
27
    """Base class for tests on a case-insensitive, case-preserving filesystem.
102
102
        os.rename('MixedCaseParent', 'mixedcaseparent')
103
103
        self.check_empty_output('add mixedcaseparent')
104
104
 
 
105
    def test_add_not_found(self):
 
106
        """Test add when the input file doesn't exist."""
 
107
        wt = self.make_branch_and_tree('.')
 
108
        # create a file on disk with the mixed-case name
 
109
        self.build_tree(['MixedCaseParent/', 'MixedCaseParent/MixedCase'])
 
110
        expected_fname = pathjoin(wt.basedir, "MixedCaseParent", "notfound")
 
111
        expected_msg = "bzr: ERROR: No such file: %r\n" % expected_fname
 
112
        self.check_error_output(3, expected_msg, 'add mixedcaseparent/notfound')
 
113
 
105
114
 
106
115
class TestMove(TestCICPBase):
107
116
    def test_mv_newname(self):