##// END OF EJS Templates
Use multiline preparser (treat line breaks as line start)
Use multiline preparser (treat line breaks as line start)

File last commit:

r887:4c64bb9d default
r887:4c64bb9d default
Show More
test_parser.py
11 lines | 408 B | text/x-python | PythonLexer
from django.test import TestCase
from boards.models import Post
class ParserTest(TestCase):
def test_preparse_quote(self):
raw_text = '>quote\nQuote in >line\nLine\n>Quote'
preparsed_text = Post.objects._preparse_text(raw_text)
self.assertEqual(
'[quote]quote[/quote]\nQuote in >line\nLine\n[quote]Quote[/quote]',
preparsed_text, 'Quote not preparsed.')