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

[merge] bzr.dev 2255

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
 
39
39
class TestOSUtils(TestCaseInTempDir):
40
40
 
 
41
    def test_contains_whitespace(self):
 
42
        self.failUnless(osutils.contains_whitespace(u' '))
 
43
        self.failUnless(osutils.contains_whitespace(u'hello there'))
 
44
        self.failUnless(osutils.contains_whitespace(u'hellothere\n'))
 
45
        self.failUnless(osutils.contains_whitespace(u'hello\nthere'))
 
46
        self.failUnless(osutils.contains_whitespace(u'hello\rthere'))
 
47
        self.failUnless(osutils.contains_whitespace(u'hello\tthere'))
 
48
 
 
49
        # \xa0 is "Non-breaking-space" which on some python locales thinks it
 
50
        # is whitespace, but we do not.
 
51
        self.failIf(osutils.contains_whitespace(u''))
 
52
        self.failIf(osutils.contains_whitespace(u'hellothere'))
 
53
        self.failIf(osutils.contains_whitespace(u'hello\xa0there'))
 
54
 
41
55
    def test_fancy_rename(self):
42
56
        # This should work everywhere
43
57
        def rename(a, b):