From b2054d3f6c211cc19c6260a93c7b3a40260f3890 Mon Sep 17 00:00:00 2001 From: Guillaume Mourier Date: Fri, 28 Oct 2022 18:27:43 +0200 Subject: [PATCH] Add insta test on geo filters whitespacing --- filter-parser/src/lib.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filter-parser/src/lib.rs b/filter-parser/src/lib.rs index 6274964bd..d30c1b58e 100644 --- a/filter-parser/src/lib.rs +++ b/filter-parser/src/lib.rs @@ -503,10 +503,12 @@ pub mod tests { // Test geo radius insta::assert_display_snapshot!(p("_geoRadius(12, 13, 14)"), @"_geoRadius({12}, {13}, {14})"); insta::assert_display_snapshot!(p("NOT _geoRadius(12, 13, 14)"), @"NOT (_geoRadius({12}, {13}, {14}))"); + insta::assert_display_snapshot!(p("_geoRadius(12,13,14)"), @"_geoRadius({12}, {13}, {14})"); // Test geo bounding box insta::assert_display_snapshot!(p("_geoBoundingBox((12, 13), (14, 15))"), @"_geoBoundingBox(({12}, {13}), ({14}, {15}))"); insta::assert_display_snapshot!(p("NOT _geoBoundingBox((12, 13), (14, 15))"), @"NOT (_geoBoundingBox(({12}, {13}), ({14}, {15})))"); + insta::assert_display_snapshot!(p("_geoBoundingBox((12,13),(14,15))"), @"_geoBoundingBox(({12}, {13}), ({14}, {15}))"); // Test OR + AND insta::assert_display_snapshot!(p("channel = ponce AND 'dog race' != 'bernese mountain'"), @"AND[{channel} = {ponce}, {dog race} != {bernese mountain}, ]");