Add tests for special characters [ '"].

This commit is contained in:
Richard Lyons 2024-06-22 13:30:49 +02:00
parent bc5068fece
commit 7897ad1d5a
1 changed files with 15 additions and 0 deletions

View File

@ -67,6 +67,21 @@ class TestElasticsearchEngine(SearxTestCase): # pylint: disable=missing-class-d
'{"query": {"simple_query_string": {"query": "{{QUERY}}"}}}',
'{"query": {"simple_query_string": {"query": "stuff"}}}',
],
[
'space stuff',
'{"query": {"simple_query_string": {"query": "{{QUERY}}"}}}',
'{"query": {"simple_query_string": {"query": "space stuff"}}}',
],
[
'"space stuff"',
'{"query": {"simple_query_string": {"query": "{{QUERY}}"}}}',
'{"query": {"simple_query_string": {"query": "\\\"space stuff\\\""}}}',
],
[
"embedded'apostrophe",
'{"query": {"simple_query_string": {"query": "{{QUERY}}"}}}',
'{"query": {"simple_query_string": {"query": "embedded\'apostrophe"}}}',
],
[
'more:stuff',
'{"query": {"simple_query_string": {"query": "{{QUERY}}"}}}',