Show
Ignore:
Timestamp:
09/24/08 16:18:02 (18 months ago)
Author:
JensDiemer
Message:
  • Creole lineending bugfix: convert all lineendings to \n
  • Add a test for this.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/pylucid_project/tests/markup_creole.py

    r1771 r1774  
    8787        out_string = self._parse("a text line.") 
    8888        self.assertEqual(out_string, "<p>a text line.</p>\n") 
     89 
     90    def test_lineendings(self): 
     91        """ Test all existing lineending version """ 
     92        out_string = self._parse(u"first\nsecond") 
     93        self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 
     94         
     95        out_string = self._parse(u"first\rsecond") 
     96        self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 
     97         
     98        out_string = self._parse(u"first\r\nsecond") 
     99        self.assertEqual(out_string, u"<p>first<br />\nsecond</p>\n") 
    89100 
    90101    def test_creole_linebreak(self):