From 7f69e814219268610c9d5c9b724f64a17a78b2cb Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sun, 10 Feb 2019 23:50:39 +0000 Subject: JSON: add iterative conditions for arrays (cherry picked from commit c5c57c4eafde32a0632c2a00bdc634860fc5d06d) --- test/scripts/0000-Basic/0002 | 3 +++ test/stdout/0002 | 3 +++ 2 files changed, 6 insertions(+) (limited to 'test') diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 5229f87e6..65ad69047 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -912,6 +912,9 @@ expect: <> <${extract jsons{nonexistent}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}> expect: <> +${if forany_json {[1, 2, 3]}{={$item}{1}}{yes}{no}} +${if forany_jsons{["A", "B", "C"]}{eq{$item}{B}}{yes}{no}} + **** # Test "escape" with print_topbitchars exim -be -DPTBC=print_topbitchars diff --git a/test/stdout/0002 b/test/stdout/0002 index df3e3ea88..f5a97289a 100644 --- a/test/stdout/0002 +++ b/test/stdout/0002 @@ -855,6 +855,9 @@ xyz > <> > expect: <> > +> yes +> yes +> > > escape: B7·F2ò > -- cgit v1.2.3