diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-09-12 09:26:29 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-09-12 09:26:29 +0100 |
| commit | fd2f9f53fce3f7d07f1f6152e983b01a445c3049 (patch) | |
| tree | 85493ae67130af64b8782620e9d5be3bb9ce2bf4 /tests | |
| parent | d05095fdc8608cb47844a2594e0480c04304fb89 (diff) | |
Add test for unterminated string with trailing escaped quote
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/styles/parser/tokeniser_tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/styles/parser/tokeniser_tests.py b/tests/styles/parser/tokeniser_tests.py index 9fce077..81238aa 100644 --- a/tests/styles/parser/tokeniser_tests.py +++ b/tests/styles/parser/tokeniser_tests.py @@ -43,6 +43,10 @@ def test_unterminated_strings_are_tokenised(): assert_tokens("'Tristan", is_token("unterminated string", "'Tristan")) +def test_unterminated_strings_ending_with_escaped_string_terminator_are_tokenised(): + assert_tokens("'Tristan\\'", is_token("unterminated string", "'Tristan\\'")) + + def test_unterminated_strings_with_unterminated_escape_are_tokenised(): assert_tokens("'Tristan\\", is_token("unterminated string", "'Tristan\\")) |
