/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

  • Committer: Aaron Bentley
  • Date: 2007-02-08 16:12:38 UTC
  • mfrom: (2270 +trunk)
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: abentley@panoramicfeedback.com-20070208161238-zx0nibynsq71twmo
Merge bzr.dev

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):