Python: Allow single quote strings and accept test changes.

This commit is contained in:
Mathias Vorreiter Pedersen
2020-10-31 18:01:55 +01:00
parent 0bc4d52d66
commit 870ed0039b
2 changed files with 1 additions and 3 deletions

View File

@@ -233,7 +233,7 @@ private string expectationPattern() {
exists(string tag, string tags, string value |
tag = "[A-Za-z-_][A-Za-z-_0-9]*" and
tags = "((?:" + tag + ")(?:\\s*,\\s*" + tag + ")*)" and
value = "((?:\"[^\"]*\"|\\S+)*)" and
value = "((?:\"[^\"]*\"|'[^']*'|\\S+)*)" and
result = tags + "(?:=" + value + ")?"
)
}

View File

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