From b19220000874fea2b8436c4b7f21de4f618bf5c7 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 29 Jun 2023 20:20:37 -0400 Subject: [PATCH] fix: update tests from python grammar changes --- cli/src/tests/parser_test.rs | 2 +- test/fixtures/error_corpus/python_errors.txt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cli/src/tests/parser_test.rs b/cli/src/tests/parser_test.rs index f06d88b8..da9aefa8 100644 --- a/cli/src/tests/parser_test.rs +++ b/cli/src/tests/parser_test.rs @@ -509,7 +509,7 @@ fn test_parsing_after_detecting_error_in_the_middle_of_a_string_token() { let tree = parser.parse(&source, None).unwrap(); assert_eq!( tree.root_node().to_sexp(), - "(module (expression_statement (assignment left: (identifier) right: (expression_list (identifier) (string string_content: (string_content))))))" + "(module (expression_statement (assignment left: (identifier) right: (expression_list (identifier) (string (string_start) (string_content) (string_end))))))" ); // Delete a suffix of the source code, starting in the middle of the string diff --git a/test/fixtures/error_corpus/python_errors.txt b/test/fixtures/error_corpus/python_errors.txt index bd3101a9..d5b4a5dd 100644 --- a/test/fixtures/error_corpus/python_errors.txt +++ b/test/fixtures/error_corpus/python_errors.txt @@ -90,7 +90,9 @@ def a(): (ERROR (identifier)) body: (block (expression_statement (string - string_content: (string_content)))))) + (string_start) + (string_content) + (string_end)))))) =========================================== incomplete definition in class definition