From fd2f9f53fce3f7d07f1f6152e983b01a445c3049 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 12 Sep 2026 09:26:29 +0100 Subject: Add test for unterminated string with trailing escaped quote --- tests/styles/parser/tokeniser_tests.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') 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\\")) -- cgit v1.2.3