forked from django/django
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed django#3733 -- Fixed up quote parsing in smart_split(). Thanks,…
… Ivan Chelubeev. git-svn-id: http://code.djangoproject.com/svn/django/trunk@4870 bcc190cf-cafb-0310-a4f2-bffc1f526a37
- Loading branch information
Showing
5 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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' | ||
""" |