/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-07 03:09:58 UTC
  • mfrom: (2268 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2269.
  • Revision ID: aaron.bentley@utoronto.ca-20070207030958-fx6ykp7rg7zma6xu
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):