From 93eb803ee359e0825890dba8776b432ccad4bbe8 Mon Sep 17 00:00:00 2001 From: GreasySlug <9619abgoni@gmail.com> Date: Sat, 28 Jun 2025 14:09:51 +0900 Subject: [PATCH] test(parse): add neg test --- crates/erg_parser/tests/parse_test.rs | 5 +++++ crates/erg_parser/tests/unmatched_paren.er | 1 + 2 files changed, 6 insertions(+) create mode 100644 crates/erg_parser/tests/unmatched_paren.er diff --git a/crates/erg_parser/tests/parse_test.rs b/crates/erg_parser/tests/parse_test.rs index 8b780a36..a15be423 100644 --- a/crates/erg_parser/tests/parse_test.rs +++ b/crates/erg_parser/tests/parse_test.rs @@ -84,6 +84,11 @@ fn parse_invalid_class_definition() -> Result<(), ()> { expect_failure("tests/invalid_class_definition.er", 0, 7) } +#[test] +fn parse_missing_paren() -> Result<(), ()> { + expect_failure("tests/missing_paren.er", 0, 1) +} + #[test] fn parse_warns() -> Result<(), ()> { expect_success("tests/warns.er", 1) diff --git a/crates/erg_parser/tests/unmatched_paren.er b/crates/erg_parser/tests/unmatched_paren.er new file mode 100644 index 00000000..fdcb1043 --- /dev/null +++ b/crates/erg_parser/tests/unmatched_paren.er @@ -0,0 +1 @@ +func a, b) = a + b \ No newline at end of file