X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/c092711614b9b12df56869a95bc9609f913e7be3..8fdf20fd84ec88d8f8a250f56d2b4d29ba946392:/test/scripts/0000-Basic/0002 diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 27bf70806..65ce40b6a 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -874,6 +874,27 @@ ${if ={1}{1} {true}{${if ={1}{1} {true}{${if ={1}{1}{true}fail}}}}} ${env {USER}} ${env {NO_SUCH_VARIABLE} {oops, success} {correct}} +# JSON + +${extract json {Url} \ + { \{ \"Url\": \"http://www.example.com/image/481989943\",\ + \"Height\": 125,\ + \"Width\": 100\ + \} \ + } \ + } +${extract json {Width} \ + { \{ \"Url\": \"http://www.example.com/image/481989943\",\ + \"Height\": 125,\ + \"Width\": 100\ + \} \ + } \ + } +${extract json {2} {[116, 943, 234, 38793]} } +${extract json {2} {${extract json{IDs} {\{"other":"foo", "IDs": [116, 943, 234]\} }}} } + +${extract json {seconds} { \{"hours":0, "mins":0, "seconds":59\} }} +${extract json {seconds} {${extract json {2} { ["irrelevant", \{"hours":0, "mins":0, "seconds":59\}] }}}} **** # Test "escape" with print_topbitchars exim -be -DPTBC=print_topbitchars