summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2019-01-10 13:05:10 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2019-01-10 15:24:00 +0000
commitb13354a7c428fdb2286d2227fdad5378a1ee9426 (patch)
tree3d219a4e74d2bfb693a81431d505de072de29c6d /test
parent9669c6e06fa8441557a70ba0759eda19287681ad (diff)
Fix json extract operator for unfound case
Diffstat (limited to 'test')
-rw-r--r--test/scripts/0000-Basic/00023
-rw-r--r--test/stdout/00023
2 files changed, 6 insertions, 0 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002
index e192a5593..7a9b38dba 100644
--- a/test/scripts/0000-Basic/0002
+++ b/test/scripts/0000-Basic/0002
@@ -902,6 +902,9 @@ expect: {"1":116, "2":943, "3":234}
${extract json{IDs}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}
expect: {"1":116, "2":943, "3":234}
+<${extract json{nonexistent}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}>
+expect: <>
+
****
# Test "escape" with print_topbitchars
exim -be -DPTBC=print_topbitchars
diff --git a/test/stdout/0002 b/test/stdout/0002
index 949c35eb2..44117a9fc 100644
--- a/test/stdout/0002
+++ b/test/stdout/0002
@@ -845,6 +845,9 @@ xyz
> {"1":116, "2":943, "3":234}
> expect: {"1":116, "2":943, "3":234}
>
+> Failed: missing '"' wrapping string key for extract json
+> expect: <>
+>
>
> escape: B7·F2ò
>