~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: abentley
  • Date: 2006-04-20 23:47:53 UTC
  • mfrom: (1681 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1683.
  • Revision ID: abentley@lappy-20060420234753-6a6874b76f09f86d
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        self.assertRaises(BzrBadParameterNotUnicode,
91
91
                          osutils.safe_unicode,
92
92
                          '\xbb\xbb')
 
93
 
 
94
 
 
95
class TestSplitLines(TestCase):
 
96
 
 
97
    def test_split_unicode(self):
 
98
        self.assertEqual([u'foo\n', u'bar\xae'],
 
99
                         osutils.split_lines(u'foo\nbar\xae'))
 
100
        self.assertEqual([u'foo\n', u'bar\xae\n'],
 
101
                         osutils.split_lines(u'foo\nbar\xae\n'))
 
102
 
 
103
    def test_split_with_carriage_returns(self):
 
104
        self.assertEqual(['foo\rbar\n'],
 
105
                         osutils.split_lines('foo\rbar\n'))