mirror of
https://github.com/django/django.git
synced 2025-10-10 23:39:11 +00:00
Most of the filter porting was done by Ivan Sagalaev. Fixed #3977. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
18 lines
540 B
Python
18 lines
540 B
Python
"""
|
|
# Tests for stuff in django.utils.text.
|
|
|
|
>>> from django.utils.text import *
|
|
|
|
### smart_split ###########################################################
|
|
>>> list(smart_split(r'''This is "a person" test.'''))
|
|
[u'This', u'is', u'"a person"', u'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'''))
|
|
[u'"a', u"'one"]
|
|
>>> print list(smart_split(r'''all friends' tests'''))[1]
|
|
friends'
|
|
"""
|