~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_errors.py

  • Committer: John Arbash Meinel
  • Date: 2008-03-17 20:11:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3532.
  • Revision ID: john@arbash-meinel.com-20080317201130-254scn9jqanfvc92
Raise a clear error about the offending filename when there is a filename with bad characters.
Related to bug #77657

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
class TestErrors(TestCaseWithTransport):
32
32
 
 
33
    def test_bad_filename_encoding(self):
 
34
        error = errors.BadFilenameEncoding('bad/filen\xe5me', 'UTF-8')
 
35
        self.assertEqualDiff(
 
36
            "Filename 'bad/filen\\xe5me' is not valid in your current"
 
37
            " filesystem encoding UTF-8",
 
38
            str(error))
 
39
 
33
40
    def test_corrupt_dirstate(self):
34
41
        error = errors.CorruptDirstate('path/to/dirstate', 'the reason why')
35
42
        self.assertEqualDiff(