mirror of
https://github.com/Luzifer/cloudkeys-go.git
synced 2024-11-13 00:12:43 +00:00
60 lines
1.5 KiB
JSON
60 lines
1.5 KiB
JSON
|
[{
|
||
|
"given":
|
||
|
{"outer": {"foo": "foo", "bar": "bar", "baz": "baz"}},
|
||
|
"cases": [
|
||
|
{
|
||
|
"expression": "outer.foo || outer.bar",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.foo||outer.bar",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bar || outer.baz",
|
||
|
"result": "bar"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bar||outer.baz",
|
||
|
"result": "bar"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bad || outer.foo",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bad||outer.foo",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.foo || outer.bad",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.foo||outer.bad",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bad || outer.alsobad",
|
||
|
"result": null
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.bad||outer.alsobad",
|
||
|
"result": null
|
||
|
}
|
||
|
]
|
||
|
}, {
|
||
|
"given":
|
||
|
{"outer": {"foo": "foo", "bool": false, "empty_list": [], "empty_string": ""}},
|
||
|
"cases": [
|
||
|
{
|
||
|
"expression": "outer.empty_string || outer.foo",
|
||
|
"result": "foo"
|
||
|
},
|
||
|
{
|
||
|
"expression": "outer.nokey || outer.bool || outer.empty_list || outer.empty_string || outer.foo",
|
||
|
"result": "foo"
|
||
|
}
|
||
|
]
|
||
|
}]
|