зеркало из https://github.com/github/codeql.git
Merge pull request #951 from markshannon/python-string-tests
Python: Add a test for handling of corner-case strings.
This commit is contained in:
Коммит
caf0bfe858
|
@ -0,0 +1,4 @@
|
|||
| test.py:3:1:3:33 | test.py:3 | u' | [\ufffd-\ufffd][\ufffd-\ufffd] |
|
||||
| test.py:5:1:5:26 | test.py:5 | u' | [\ufffd-\ufffd] |
|
||||
| test.py:8:1:8:20 | test.py:8 | u' | {}\r{}{:<{width}} |
|
||||
| test.py:9:1:9:15 | test.py:9 | u' | {}\r{}{:<{}} |
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
import python
|
||||
|
||||
from StrConst s
|
||||
select s.getLocation(), s.getPrefix(), s.getText()
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
#Half Surrogate pairs
|
||||
u'[\uD800-\uDBFF][\uDC00-\uDFFF]'
|
||||
#Outside BMP
|
||||
u'[\U00010000-\U0010ffff]'
|
||||
|
||||
#Troublesome format strings
|
||||
u'{}\r{}{:<{width}}'
|
||||
u'{}\r{}{:<{}}'
|
Загрузка…
Ссылка в новой задаче