From e51e829e195b0d37eaceaa91a44adaaa42240034 Mon Sep 17 00:00:00 2001 From: Tamo Date: Wed, 17 Sep 2025 18:19:00 +0200 Subject: [PATCH] update the filter-parser after updating its error messages --- crates/filter-parser/src/lib.rs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/crates/filter-parser/src/lib.rs b/crates/filter-parser/src/lib.rs index cbe611ff7..a702fa9ca 100644 --- a/crates/filter-parser/src/lib.rs +++ b/crates/filter-parser/src/lib.rs @@ -851,8 +851,6 @@ pub mod tests { // Test geo polygon insta::assert_snapshot!(p("_geoPolygon([12, 13], [14, 15], [16, 17])"), @"_geoPolygon([[{12}, {13}], [{14}, {15}], [{16}, {17}], ])"); - insta::assert_snapshot!(p("_geoPolygon([12, 13], [14, 15], [16, 17],)"), @"_geoPolygon([[{12}, {13}], [{14}, {15}], [{16}, {17}], ])"); - insta::assert_snapshot!(p("_geoPolygon([12, 13], [14, 15])"), @"_geoPolygon([[{12}, {13}], [{14}, {15}], ])"); insta::assert_snapshot!(p("_geoPolygon([12, 13], [14, 15], [-1.2,2939.2], [1,1])"), @"_geoPolygon([[{12}, {13}], [{14}, {15}], [{-1.2}, {2939.2}], [{1}, {1}], ])"); // Test OR + AND @@ -957,7 +955,7 @@ pub mod tests { "); insta::assert_snapshot!(p("_geoPolygon([1,2,3])"), @r" - The `_geoPolygon` filter expects at least 2 points + The `_geoPolygon` filter expects at least 3 points but only 1 were specified 18:19 _geoPolygon([1,2,3]) "); @@ -966,9 +964,14 @@ pub mod tests { 13:19 _geoPolygon(1,2,3) "); - insta::assert_snapshot!(p("_geoPolygon([1,2],[1,2,3])"), @r" + insta::assert_snapshot!(p("_geoPolygon([1,2],[1,2],[1,2,3])"), @r" Was expecting 2 coordinates but instead found 3. - 20:21 _geoPolygon([1,2],[1,2,3]) + 26:27 _geoPolygon([1,2],[1,2],[1,2,3]) + "); + + insta::assert_snapshot!(p("_geoPolygon([1,2],[1,2,3])"), @r" + The `_geoPolygon` filter expects at least 3 points but only 2 were specified + 24:25 _geoPolygon([1,2],[1,2,3]) "); insta::assert_snapshot!(p("_geoPolygon(1)"), @r"