From 7e9cfc90be53d88b48782eb7e63a27ea37e4dcb3 Mon Sep 17 00:00:00 2001 From: jochenberger Date: Thu, 23 Mar 2017 15:18:39 +0100 Subject: [PATCH] Add test --- .../src/test/java/com/jayway/jsonpath/FilterTest.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/json-path/src/test/java/com/jayway/jsonpath/FilterTest.java b/json-path/src/test/java/com/jayway/jsonpath/FilterTest.java index 58493a35..a9c02e76 100644 --- a/json-path/src/test/java/com/jayway/jsonpath/FilterTest.java +++ b/json-path/src/test/java/com/jayway/jsonpath/FilterTest.java @@ -89,6 +89,13 @@ public class FilterTest extends BaseTest { assertThat(filter(where("string-key").eq(null)).apply(createPredicateContext(json))).isEqualTo(false); } + @Test + public void arr_eq_evals() { + assertThat(filter(where("arr-empty").eq("[]")).apply(createPredicateContext(json))).isEqualTo(true); + assertThat(filter(where("int-arr").eq("[0,1,2,3,4]")).apply(createPredicateContext(json))).isEqualTo(true); + assertThat(filter(where("int-arr").eq("[0,1,2,3]")).apply(createPredicateContext(json))).isEqualTo(false); + assertThat(filter(where("int-arr").eq("[0,1,2,3,4,5]")).apply(createPredicateContext(json))).isEqualTo(false); + } //---------------------------------------------------------------------------- // // NE