~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_osutils.py

  • Committer: Mark Hammond
  • Date: 2008-12-28 05:21:23 UTC
  • mfrom: (3920 +trunk)
  • mto: (3932.1.1 prepare-1.11)
  • mto: This revision was merged to the branch mainline in revision 3937.
  • Revision ID: mhammond@skippinet.com.au-20081228052123-f78xs5sbdkotshwf
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007, 2008 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
756
756
        self.assertEndsWith(osutils._mac_getcwd(), u'B\xe5gfors')
757
757
 
758
758
 
 
759
class TestChunksToLines(TestCase):
 
760
 
 
761
    def test_smoketest(self):
 
762
        self.assertEqual(['foo\n', 'bar\n', 'baz\n'],
 
763
                         osutils.chunks_to_lines(['foo\nbar', '\nbaz\n']))
 
764
        self.assertEqual(['foo\n', 'bar\n', 'baz\n'],
 
765
                         osutils.chunks_to_lines(['foo\n', 'bar\n', 'baz\n']))
 
766
 
 
767
    def test_is_compiled(self):
 
768
        from bzrlib.tests.test__chunks_to_lines import CompiledChunksToLinesFeature
 
769
        if CompiledChunksToLinesFeature:
 
770
            from bzrlib._chunks_to_lines_pyx import chunks_to_lines
 
771
        else:
 
772
            from bzrlib._chunks_to_lines_py import chunks_to_lines
 
773
        self.assertIs(chunks_to_lines, osutils.chunks_to_lines)
 
774
 
 
775
 
759
776
class TestSplitLines(TestCase):
760
777
 
761
778
    def test_split_unicode(self):