diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2023-07-08 17:59:20 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2023-07-08 17:59:20 +0100 |
commit | aae2bf28db36ab9133829dc33ea6ef886e8373c2 (patch) | |
tree | 1e1b669d5d6381ddd9b5e21e7142847f66fffcc8 /test/scripts/0000-Basic | |
parent | 00392be0e7cfb5c6c6ce173ff31d81ab2a2e8779 (diff) |
Fix json extract for strings carrying commas. Bug 3006
Diffstat (limited to 'test/scripts/0000-Basic')
-rw-r--r-- | test/scripts/0000-Basic/0002 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/scripts/0000-Basic/0002 b/test/scripts/0000-Basic/0002 index 58ec29250..dab982253 100644 --- a/test/scripts/0000-Basic/0002 +++ b/test/scripts/0000-Basic/0002 @@ -982,6 +982,13 @@ expect: <> <${extract jsons{nonexistent}{ \{"id": \{"a":101, "b":102\}, "IDs": \{"1":116, "2":943, "3":234\}\} }}> expect: <> +# string value with embedded comma +<${extract jsons{name}{ \{ "id":"1","name":"Doe, John","age":"unknown" \}}}> +expect <Doe, John> +# string value with embedded doublequote +<${extract jsons{name}{ \{ "id":"1","name":"word1 \\\" word2","age":"unknown" \}}}> +expect <word1 \\\" word2> + ${if forany_json {[1, 2, 3]}{={$item}{1}}{yes}{no}} ${if forany_jsons{["A", "B", "C"]}{eq{$item}{B}}{yes}{no}} |