Filter: exact match takes precedence over wildcard (fixes #1628)

This commit is contained in:
Benoit Blanchon
2021-08-13 10:35:04 +02:00
parent f570fe8c37
commit 2c3ae1c181
3 changed files with 12 additions and 2 deletions

View File

@ -232,6 +232,15 @@ TEST_CASE("Filtering") {
"{\"example\":{\"outcome\":42}}",
2 * JSON_OBJECT_SIZE(1) + 16
},
{
// exclusion filter (issue #1628)
"{\"example\":1,\"ignored\":2}",
"{\"*\":true,\"ignored\":false}",
10,
DeserializationError::Ok,
"{\"example\":1}",
JSON_OBJECT_SIZE(1) + 8
},
{
// only the first element of array counts
"[1,2,3]",