summaryrefslogtreecommitdiff
path: root/tests/regressiontests/text/tests.py
blob: f758ecaf904c0fecbf7b4c39b449c3a7e7ccf168 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"""
# Tests for stuff in django.utils.text.

>>> from django.utils.text import *

### smart_split ###########################################################
>>> list(smart_split(r'''This is "a person" test.'''))
['This', 'is', '"a person"', 'test.']
>>> print list(smart_split(r'''This is "a person's" test.'''))[2]
"a person's"
>>> print list(smart_split(r'''This is "a person\\"s" test.'''))[2]
"a person"s"
>>> list(smart_split('''"a 'one'''))
['"a', "'one"]
>>> print list(smart_split(r'''all friends' tests'''))[1]
friends'
"""