Skip to content

Commit 870ed00

Browse files
committed
Python: Allow single quote strings and accept test changes.
1 parent 0bc4d52 commit 870ed00

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

python/ql/test/TestUtilities/InlineExpectationsTest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ private string expectationPattern() {
233233
exists(string tag, string tags, string value |
234234
tag = "[A-Za-z-_][A-Za-z-_0-9]*" and
235235
tags = "((?:" + tag + ")(?:\\s*,\\s*" + tag + ")*)" and
236-
value = "((?:\"[^\"]*\"|\\S+)*)" and
236+
value = "((?:\"[^\"]*\"|'[^']*'|\\S+)*)" and
237237
result = tags + "(?:=" + value + ")?"
238238
)
239239
}

python/ql/test/experimental/library-tests/frameworks/django-v1/ConceptsTest.expected

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
| response_test.py:16:12:16:86 | ControlFlowNode for HttpResponse() | Unexpected result: responseBody='<img src="0" onerror="alert(1)">' |
2-
| response_test.py:16:89:16:171 | Comment # $HttpResponse mimetype=text/plain responseBody='<img src="0" onerror="alert(1)">' | Missing result:responseBody='<img |
31
| response_test.py:21:12:21:56 | ControlFlowNode for HttpResponseRedirect() | Unexpected result: mimetype=text/html; charset=utf-8 |
42
| response_test.py:21:59:21:132 | Comment # $HttpResponse mimetype=text/html; charset=utf-8 responseBody=Attribute() | Missing result:mimetype=text/html; |
53
| response_test.py:25:12:25:56 | ControlFlowNode for HttpResponseNotFound() | Unexpected result: mimetype=text/html; charset=utf-8 |

0 commit comments

Comments
 (0)