packages feed

jsonlogic-hs-0.1.0.0: test/community/string/in.json

[
    "Basic Array Checks",
    {
        "description": "In operator with array finds exact match",
        "rule": { "in": ["Bart", ["Bart", "Homer", "Lisa"]] },
        "data": null,
        "result": true
    },
    {
        "description": "In operator with array returns false for no match",
        "rule": { "in": ["Milhouse", ["Bart", "Homer", "Lisa"]] },
        "data": null,
        "result": false
    },
    "String Contains Checks",
    {
        "description": "In operator with string finds substring",
        "rule": { "in": ["Spring", "Springfield"] },
        "data": null,
        "result": true
    },
    {
        "description": "In operator with string is case sensitive",
        "rule": { "in": ["spring", "Springfield"] },
        "data": null,
        "result": false
    },
    {
        "description": "In operator with string returns false for no match",
        "rule": { "in": ["i", "team"] },
        "data": null,
        "result": false
    },
    "Edge Cases",
    {
        "description": "In operator with empty array returns false",
        "rule": { "in": ["test", []] },
        "data": null,
        "result": false
    },
    {
        "description": "In operator with empty string search returns true",
        "rule": { "in": ["", "test"] },
        "data": null,
        "result": true
    },
    {
        "description": "In operator with empty string target returns false",
        "rule": { "in": ["test", ""] },
        "data": null,
        "result": false
    }
]