1
0
Fork 0

Adding upstream version 26.25.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-06-07 04:46:28 +02:00
parent bc7749846c
commit d9e621c994
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
83 changed files with 67317 additions and 67680 deletions

View file

@ -186,3 +186,18 @@ x"""
(TokenType.STRING, ") }}"),
],
)
def test_partial_token_list(self):
tokenizer = Tokenizer()
try:
# This is expected to fail due to the unbalanced string quotes
tokenizer.tokenize("foo 'bar")
except TokenError as e:
self.assertIn("Error tokenizing 'foo 'ba'", str(e))
partial_tokens = tokenizer.tokens
self.assertEqual(len(partial_tokens), 1)
self.assertEqual(partial_tokens[0].token_type, TokenType.VAR)
self.assertEqual(partial_tokens[0].text, "foo")