Merge parser and expressions into repository
This commit is contained in:
+64
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"empty_expression": [{
|
||||
"expr": "",
|
||||
"result": {
|
||||
"kind": "Null",
|
||||
"value": null
|
||||
}
|
||||
}],
|
||||
"equal_simple": [{
|
||||
"expr": "1 == 2",
|
||||
"result": {
|
||||
"kind": "Boolean",
|
||||
"value": false
|
||||
}
|
||||
}],
|
||||
"context_simple_access": [{
|
||||
"expr": "simple",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "foo"
|
||||
},
|
||||
"contexts": {
|
||||
"simple": "foo"
|
||||
}
|
||||
}],
|
||||
"context_case-insensitive": [{
|
||||
"expr": "SIMple.TEst",
|
||||
"result": {
|
||||
"kind": "Number",
|
||||
"value": 123.0
|
||||
},
|
||||
"contexts": {
|
||||
"simPLE": {
|
||||
"teST": 123
|
||||
}
|
||||
}
|
||||
}],
|
||||
"context access with wildcard": [{
|
||||
"expr": "toJson(input.*.foo)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "[\n 32,\n 42,\n -10,\n 0,\n 2,\n 17\n]"
|
||||
},
|
||||
"contexts": {
|
||||
"input": {
|
||||
"test": { "foo": 32 },
|
||||
"test2": { "foo": 42 },
|
||||
"test3": { "foo": -10 },
|
||||
"test4": { "foo": 0 },
|
||||
"test5": { "foo": 2 },
|
||||
"test6": { "foo": 17 }
|
||||
}
|
||||
}
|
||||
}],
|
||||
"unknown context": [
|
||||
{
|
||||
"expr": "nosuchcontext.foo",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'nosuchcontext'. Located at position 1 within expression: nosuchcontext.foo"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"refer ./operator_not.json": [
|
||||
]
|
||||
}
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
{
|
||||
"null": [
|
||||
{
|
||||
"expr": "null == 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"boolean": [
|
||||
{
|
||||
"expr": "true == 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false == 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
{
|
||||
"expr": "'' == 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 123456.789 ' == 123456.789",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' +123456.789 ' == 123456.789",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' -123456.789 ' == -123456.789",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0xff ' == 255",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0xFF ' == 255",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0o10 ' == 8",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' Infinity ' == Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' -Infinity ' == -Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' NaN ' != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' NaN ' == NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' NaN ' > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' NaN ' < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' abc ' != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' abc ' == NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' abc ' > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' abc ' < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"array": [
|
||||
{
|
||||
"expr": "fromjson('[]') != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') == NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"object": [
|
||||
{
|
||||
"expr": "fromjson('[]') != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') == NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('[]') < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
]
|
||||
}
|
||||
+178
@@ -0,0 +1,178 @@
|
||||
{
|
||||
"null": [
|
||||
{
|
||||
"expr": "format('{0}', null)",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
}
|
||||
],
|
||||
"boolean": [
|
||||
{
|
||||
"expr": "format('{0}', true)",
|
||||
"result": { "kind": "String", "value": "true" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', false)",
|
||||
"result": { "kind": "String", "value": "false" }
|
||||
}
|
||||
],
|
||||
"number": [
|
||||
{
|
||||
"expr": "format('{0}', 1)",
|
||||
"result": { "kind": "String", "value": "1" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', .5)",
|
||||
"result": { "kind": "String", "value": "0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0.5)",
|
||||
"result": { "kind": "String", "value": "0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 2)",
|
||||
"result": { "kind": "String", "value": "2" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -1)",
|
||||
"result": { "kind": "String", "value": "-1" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -.5)",
|
||||
"result": { "kind": "String", "value": "-0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -0.5)",
|
||||
"result": { "kind": "String", "value": "-0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -2.0)",
|
||||
"result": { "kind": "String", "value": "-2" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0.0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -0.0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 123456.789)",
|
||||
"result": { "kind": "String", "value": "123456.789" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', +123456.789)",
|
||||
"result": { "kind": "String", "value": "123456.789" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -123456.789)",
|
||||
"result": { "kind": "String", "value": "-123456.789" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0.84551240822557006)",
|
||||
"result": { "kind": "String", "value": "0.84551240822557" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.9)",
|
||||
"result": { "kind": "String", "value": "1.9" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1234.56)",
|
||||
"result": { "kind": "String", "value": "1234.56" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0xff)",
|
||||
"result": { "kind": "String", "value": "255" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0xFF)",
|
||||
"result": { "kind": "String", "value": "255" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 0o10)",
|
||||
"result": { "kind": "String", "value": "8" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2e2)",
|
||||
"result": { "kind": "String", "value": "120" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2E2)",
|
||||
"result": { "kind": "String", "value": "120" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2e+2)",
|
||||
"result": { "kind": "String", "value": "120" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2E+2)",
|
||||
"result": { "kind": "String", "value": "120" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2e-2)",
|
||||
"result": { "kind": "String", "value": "0.012" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', 1.2E-2)",
|
||||
"result": { "kind": "String", "value": "0.012" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', Infinity)",
|
||||
"result": { "kind": "String", "value": "Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -Infinity)",
|
||||
"result": { "kind": "String", "value": "-Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', NaN)",
|
||||
"result": { "kind": "String", "value": "NaN" }
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
{
|
||||
"expr": "format('{0}', 'string value')",
|
||||
"result": { "kind": "String", "value": "string value" }
|
||||
}
|
||||
],
|
||||
"array": [
|
||||
{
|
||||
"expr": "format('{0}', context)",
|
||||
"contexts": {
|
||||
"context": []
|
||||
},
|
||||
"result": { "kind": "String", "value": "Array" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', context)",
|
||||
"contexts": {
|
||||
"context": [1, 2, 3]
|
||||
},
|
||||
"result": { "kind": "String", "value": "Array" }
|
||||
}
|
||||
],
|
||||
"object": [
|
||||
{
|
||||
"expr": "format('{0}', context)",
|
||||
"contexts": {
|
||||
"context": {}
|
||||
},
|
||||
"result": { "kind": "String", "value": "Object" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', context)",
|
||||
"contexts": {
|
||||
"context": { "a": 1, "b": 2, "c": 3 }
|
||||
},
|
||||
"result": { "kind": "String", "value": "Object" }
|
||||
}
|
||||
]
|
||||
}
|
||||
+122
@@ -0,0 +1,122 @@
|
||||
{
|
||||
"string": [
|
||||
{
|
||||
"expr": "contains('abcdef', 'cde')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('abCdEf', 'cDe')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('abcdef', '')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('1234', 23)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('true', true)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('false', false)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('asdf', null)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "contains('true', false)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"array": [
|
||||
{
|
||||
"expr": "contains(test, 'hello')",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": ["hello"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, 'world')",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": ["hello", "world"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, 'asdf')",
|
||||
"result": { "kind": "Boolean", "value": false },
|
||||
"contexts": { "test": ["hello"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, 123)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [123.0] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, 123)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [123.0] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, null)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [""] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, false)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [""] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test, false)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [0] }
|
||||
}
|
||||
],
|
||||
|
||||
"filtered_array": [
|
||||
{
|
||||
"expr": "contains(test.*, 'hello')",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": ["hello"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, 'world')",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": ["hello", "world"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, 'asdf')",
|
||||
"result": { "kind": "Boolean", "value": false },
|
||||
"contexts": { "test": ["hello"] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, 123)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [123.0] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, 123)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [123.0] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, null)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [""] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, false)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [""] }
|
||||
},
|
||||
{
|
||||
"expr": "contains(test.*, false)",
|
||||
"result": { "kind": "Boolean", "value": true },
|
||||
"contexts": { "test": [0] }
|
||||
}
|
||||
]
|
||||
}
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
{
|
||||
"basics": [
|
||||
{
|
||||
"expr": "endsWith('abcdef', 'def')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('abcdef', 'de')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('abcdef', '')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('1234', 34)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('true', true)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('false', false)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf', null)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('1234', 23)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('true', false)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-a-thru-z": [
|
||||
{
|
||||
"expr": "endsWith('asdf_ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ς-(final-lowercase-sigma)-Σ-(capital-sigma)-σ-(non-final-sigma)": [
|
||||
{
|
||||
"expr": "endsWith('asdf_ς', 'Σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_ς', 'σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_Σ', 'ς')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_Σ', 'σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_σ', 'ς')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_σ', 'Σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ü-Ü": [
|
||||
{
|
||||
"expr": "endsWith('asdf_ü', 'Ü')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_Ü', 'ü')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ç-Ç": [
|
||||
{
|
||||
"expr": "endsWith('asdf_ç', 'Ç')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_Ç', 'ç')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-i-İ": [
|
||||
{
|
||||
"expr": "endsWith('asdf_i', 'İ')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_İ', 'i')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-ı-I": [
|
||||
{
|
||||
"expr": "endsWith('asdf_ı', 'I')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "endsWith('asdf_I', 'ı')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"cyrillic-letters": [
|
||||
{
|
||||
"expr": "endsWith('asdf_АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЭЮЯ', 'абвгдежзийклмнопрстуфхцчшщьэюя')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
+207
@@ -0,0 +1,207 @@
|
||||
{
|
||||
"format": [
|
||||
{
|
||||
"expr": "format(null)",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "format(null, 'some arg')",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "format('')",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "format('', 'some arg')",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "format('123{0}456', 'abc')",
|
||||
"result": { "kind": "String", "value": "123abc456" }
|
||||
},
|
||||
{
|
||||
"expr": "format('123{0}456{0}789', 'abc')",
|
||||
"result": { "kind": "String", "value": "123abc456abc789" }
|
||||
},
|
||||
{
|
||||
"expr": "format('123{0}456{1}789', 'abc', 'def')",
|
||||
"result": { "kind": "String", "value": "123abc456def789" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}123', 'abc')",
|
||||
"result": { "kind": "String", "value": "abc123" }
|
||||
},
|
||||
{
|
||||
"expr": "format('123{0}', 'abc')",
|
||||
"result": { "kind": "String", "value": "123abc" }
|
||||
},
|
||||
{
|
||||
"expr": "format('123{0}{1}456', 'abc', 'def')",
|
||||
"result": { "kind": "String", "value": "123abcdef456" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{{0}}', 'abc')",
|
||||
"result": { "kind": "String", "value": "{0}" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{{{{0}}}}', 'abc')",
|
||||
"result": { "kind": "String", "value": "{{0}}" }
|
||||
},
|
||||
{
|
||||
"expr": "format('}}', 'abc')",
|
||||
"result": { "kind": "String", "value": "}" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{{', 'abc')",
|
||||
"result": { "kind": "String", "value": "{" }
|
||||
},
|
||||
{
|
||||
"expr": "format('}}{{', 'abc')",
|
||||
"result": { "kind": "String", "value": "}{" }
|
||||
},
|
||||
{
|
||||
"expr": "format('}}{{}}', 'abc')",
|
||||
"result": { "kind": "String", "value": "}{}" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', Infinity)",
|
||||
"result": { "kind": "String", "value": "Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -Infinity)",
|
||||
"result": { "kind": "String", "value": "-Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', NaN)",
|
||||
"result": { "kind": "String", "value": "NaN" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}', -0.0)",
|
||||
"result": { "kind": "String", "value": "0" }
|
||||
},
|
||||
{
|
||||
"expr": "format('{0')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {0}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}}}}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {0}}}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('0}')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: 0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('0}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: 0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{{0}')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{{0}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{{{{0}')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {{{{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{{{{0}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {{{{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('}0{')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: }0{"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('}0{', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: }0{"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('}{0}')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: }{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('}{0}', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: }{0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}{', '')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string is invalid: {0}{"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string references more arguments than were supplied: {0}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('{0}{1}', 'abc')",
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The following format string references more arguments than were supplied: {0}{1}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"basics": [
|
||||
{ "expr": "fromJSON('null')", "result": { "kind": "Null", "value": null } },
|
||||
{ "expr": "fromJSON('true')", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "fromJSON('false')", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "fromJSON('0')", "result": { "kind": "Number", "value": 0 } },
|
||||
{ "expr": "fromJSON('-0')", "result": { "kind": "Number", "value": -0 } },
|
||||
{ "expr": "fromJSON('123456789')", "result": { "kind": "Number", "value": 123456789 } },
|
||||
{ "expr": "fromJSON('-123456789')", "result": { "kind": "Number", "value": -123456789 } },
|
||||
{ "expr": "fromJSON('1234.5')", "result": { "kind": "Number", "value": 1234.5 } },
|
||||
{ "expr": "fromJSON('-1234.5')", "result": { "kind": "Number", "value": -1234.5 } },
|
||||
{ "expr": "fromJSON('\"\"')", "result": { "kind": "String", "value": "" } },
|
||||
{ "expr": "fromJSON('\"abc\"')", "result": { "kind": "String", "value": "abc" } },
|
||||
{ "expr": "fromJSON('\"abc''def\"')", "result": { "kind": "String", "value": "abc'def" } },
|
||||
{ "expr": "fromJSON('\"abc\\\\\\\"def\"')", "result": { "kind": "String", "value": "abc\\\"def" } }
|
||||
],
|
||||
"array": [
|
||||
{ "expr": "fromJSON('[]')", "result": { "kind": "Array", "value": [] } },
|
||||
{ "expr": "fromJSON('[1, 2, 3]')", "result": { "kind": "Array", "value": [1, 2, 3] } },
|
||||
{
|
||||
"expr": "fromJSON('[[1, 2, 3], [\"abc\",\"def\",\"ghi\"], [true, false, null, [], {}]]')",
|
||||
"result": {
|
||||
"kind": "Array",
|
||||
"value": [[1, 2, 3], ["abc", "def", "ghi"], [true, false, null, [], {}]]
|
||||
}
|
||||
}
|
||||
],
|
||||
"object": [
|
||||
{ "expr": "fromJSON('{}')", "result": { "kind": "Object", "value": {} } },
|
||||
{
|
||||
"expr": "fromJSON('{\"one\": \"value one\", \"two\": \"value two\", \"three\": \"value three\"}')",
|
||||
"result": {
|
||||
"kind": "Object",
|
||||
"value": {
|
||||
"one": "value one",
|
||||
"two": "value two",
|
||||
"three": "value three"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "fromJSON('{\"nested-one\": {\"one\": 1,\"two\": 2,\"three\": 3},\"nested-two\": {\"string one\": \"value one\",\"string two\": \"value two\",\"string three\": \"value three\"},\"nested-three\": {\"true\": true,\"false\": false,\"null\": null,\"array\": [],\"object\": {}}\n}')",
|
||||
"result": {
|
||||
"kind": "Object",
|
||||
"value": {
|
||||
"nested-one": {
|
||||
"one": 1,
|
||||
"two": 2,
|
||||
"three": 3
|
||||
},
|
||||
"nested-two": {
|
||||
"string one": "value one",
|
||||
"string two": "value two",
|
||||
"string three": "value three"
|
||||
},
|
||||
"nested-three": {
|
||||
"true": true,
|
||||
"false": false,
|
||||
"null": null,
|
||||
"array": [],
|
||||
"object": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+113
@@ -0,0 +1,113 @@
|
||||
{
|
||||
"join": [
|
||||
{
|
||||
"expr": "join(github.event.issue.labels.*.name, ', ')",
|
||||
"contexts": {
|
||||
"github": {
|
||||
"event": {
|
||||
"issue": {
|
||||
"labels": [
|
||||
{
|
||||
"name": "bug"
|
||||
},
|
||||
{
|
||||
"name": "enhancement"
|
||||
},
|
||||
{
|
||||
"name": "help wanted"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "bug, enhancement, help wanted" }
|
||||
},
|
||||
{
|
||||
"expr": "join(null)",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "join(true)",
|
||||
"result": { "kind": "String", "value": "true" }
|
||||
},
|
||||
{
|
||||
"expr": "join(123.456)",
|
||||
"result": { "kind": "String", "value": "123.456" }
|
||||
},
|
||||
{
|
||||
"expr": "join('abc')",
|
||||
"result": { "kind": "String", "value": "abc" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray)",
|
||||
"contexts": { "myArray": [] },
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myObject)",
|
||||
"contexts": { "myObject": {} },
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myObject)",
|
||||
"contexts": { "myObject": { "key1": "value1" } },
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray)",
|
||||
"contexts": { "myArray": [ null, true, 123.456, "abc", [], ["def"], {}, { "key1": "value1" } ] },
|
||||
"result": { "kind": "String", "value": ",true,123.456,abc,Array,Array,Object,Object" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, null)",
|
||||
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
|
||||
"result": { "kind": "String", "value": "_ITEM-1__ITEM-2__ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, true)",
|
||||
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
|
||||
"result": { "kind": "String", "value": "_ITEM-1_true_ITEM-2_true_ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, 123.456)",
|
||||
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
|
||||
"result": { "kind": "String", "value": "_ITEM-1_123.456_ITEM-2_123.456_ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, ' | ')",
|
||||
"contexts": { "myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ] },
|
||||
"result": { "kind": "String", "value": "_ITEM-1_ | _ITEM-2_ | _ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, mySeparator)",
|
||||
"contexts": {
|
||||
"myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ],
|
||||
"mySeparator": []
|
||||
},
|
||||
"result": { "kind": "String", "value": "_ITEM-1_,_ITEM-2_,_ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join(myArray, mySeparator)",
|
||||
"contexts": {
|
||||
"myArray": [ "_ITEM-1_", "_ITEM-2_", "_ITEM-3_" ],
|
||||
"mySeparator": {}
|
||||
},
|
||||
"result": { "kind": "String", "value": "_ITEM-1_,_ITEM-2_,_ITEM-3_" }
|
||||
},
|
||||
{
|
||||
"expr": "join()",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Too few parameters supplied: "
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "join(1, 2, 3)",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Too many parameters supplied: "
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"number": [
|
||||
{ "expr": "1", "result": { "kind": "Number", "value": 1.0 } },
|
||||
{ "expr": ".5", "result": { "kind": "Number", "value": 0.5 } },
|
||||
{ "expr": "0.5", "result": { "kind": "Number", "value": 0.5 } },
|
||||
{ "expr": "2", "result": { "kind": "Number", "value": 2.0 } },
|
||||
{ "expr": "-1", "result": { "kind": "Number", "value": -1.0 } },
|
||||
{ "expr": "+1", "result": { "kind": "Number", "value": 1.0 } },
|
||||
{ "expr": "-.5", "result": { "kind": "Number", "value": -0.5 } },
|
||||
{ "expr": "-2", "result": { "kind": "Number", "value": -2.0 } },
|
||||
{ "expr": "format('{0}', -Infinity)", "result": { "kind": "String", "value": "-Infinity" } },
|
||||
{ "expr": "format('{0}', Infinity)", "result": { "kind": "String", "value": "Infinity" } },
|
||||
{ "expr": "format('{0}', +Infinity)", "result": { "kind": "String", "value": "Infinity" } },
|
||||
{ "expr": "format('{0}', NaN)", "result": { "kind": "String", "value": "NaN" } },
|
||||
{ "expr": "0", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{ "expr": "0.0", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{ "expr": "-0", "result": { "kind": "Number", "value": -0.0 } },
|
||||
{ "expr": "-0.0", "result": { "kind": "Number", "value": -0.0 } },
|
||||
{ "expr": "0x0", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{ "expr": "0x00", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{ "expr": "0xf", "result": { "kind": "Number", "value": 15.0 } },
|
||||
{ "expr": "0xfF", "result": { "kind": "Number", "value": 255.0 } },
|
||||
{ "expr": "0xfFf", "result": { "kind": "Number", "value": 4095.0 } },
|
||||
{ "expr": "0o0", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{ "expr": "0o7", "result": { "kind": "Number", "value": 7.0 } },
|
||||
{ "expr": "0o77", "result": { "kind": "Number", "value": 63.0 } },
|
||||
{ "expr": "0o777", "result": { "kind": "Number", "value": 511.0 } },
|
||||
{ "expr": "1e1", "result": { "kind": "Number", "value": 10.0 } },
|
||||
{ "expr": "1e2", "result": { "kind": "Number", "value": 100.0 } },
|
||||
{ "expr": "1E1", "result": { "kind": "Number", "value": 10.0 } },
|
||||
{ "expr": "1E+1", "result": { "kind": "Number", "value": 10.0 } },
|
||||
{ "expr": "1e-1", "result": { "kind": "Number", "value": 0.1 } },
|
||||
{ "expr": "1E-1", "result": { "kind": "Number", "value": 0.1 } },
|
||||
{
|
||||
"expr": "0x01p2",
|
||||
"err": { "kind": "lexing", "value": "Unexpected symbol: '0x01p2'. Located at position 1 within expression: 0x01p2" }
|
||||
},
|
||||
{
|
||||
"expr": "-Inf",
|
||||
"err": { "kind": "lexing", "value": "Unexpected symbol: '-Inf'. Located at position 1 within expression: -Inf" }
|
||||
},
|
||||
{
|
||||
"expr": "-0xFF",
|
||||
"err": { "kind": "lexing", "value": "Unexpected symbol: '-0xFF'. Located at position 1 within expression: -0xFF" }
|
||||
},
|
||||
{
|
||||
"expr": "0xFZ",
|
||||
"err": { "kind": "lexing", "value": "Unexpected symbol: '0xFZ'. Located at position 1 within expression: 0xFZ" }
|
||||
}
|
||||
]
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"operator_and": [
|
||||
{
|
||||
"expr": "true && true && true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "true && true", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "true && true && false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true && false && true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false && true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false && false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "true && 1 && 2", "result": { "kind": "Number", "value": 2.0 } },
|
||||
{ "expr": "true && 0 && 2", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{
|
||||
"expr": "true && 'a' && 'b'",
|
||||
"result": { "kind": "String", "value": "b" }
|
||||
},
|
||||
{
|
||||
"expr": "true && '' && 'asdf'",
|
||||
"result": { "kind": "String", "value": "" }
|
||||
},
|
||||
{ "expr": "null && true", "result": { "kind": "Null", "value": null } },
|
||||
{
|
||||
"expr": "test && 123",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Number", "value": 123.0 }
|
||||
},
|
||||
{
|
||||
"expr": "test && 456",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Number", "value": 456.0 }
|
||||
},
|
||||
{
|
||||
"expr": "test && 789",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Number", "value": 789.0 }
|
||||
}
|
||||
]
|
||||
}
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
{
|
||||
"property-basics": [
|
||||
{
|
||||
"expr": "foo.bar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.Bar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.b",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"b": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo._",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"_": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo._bar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"_bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.b_ar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"b_ar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.b-ar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"b-ar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "fromJson('{\"one\": \"one val\"}').one",
|
||||
"result": { "kind": "String", "value": "one val" }
|
||||
},
|
||||
{
|
||||
"expr": "(fromJson('{\"one\": \"one val\"}')).one",
|
||||
"result": { "kind": "String", "value": "one val" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"one": "one val",
|
||||
"two": "two val"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one val", "two val"] }
|
||||
}
|
||||
],
|
||||
"property-case-insensitive": [
|
||||
{
|
||||
"expr": "foo.bar",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"BAR": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.BAR",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
}
|
||||
],
|
||||
"property-matches-const": [
|
||||
{
|
||||
"expr": "foo.true",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"true": "it's true"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's true" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.false",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"false": "it's false"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's false" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.Infinity",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Infinity": "it's Infinity"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.NaN",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"NaN": "it's NaN"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's NaN" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.null",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"null": "it's null"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's null" }
|
||||
},
|
||||
{
|
||||
"expr": "foo.format",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"format": "it's format"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's format" }
|
||||
}
|
||||
],
|
||||
"property-errors": [
|
||||
{
|
||||
"expr": "foo.b@r",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"b@r": "baz"
|
||||
}
|
||||
},
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: 'b@r'. Located at position 5 within expression: foo.b@r"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo.1",
|
||||
"contexts": {
|
||||
"foo": {}
|
||||
},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '1'. Located at position 5 within expression: foo.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "fromjson('').1",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '1'. Located at position 14 within expression: fromjson('').1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo[1].2",
|
||||
"contexts": {
|
||||
"foo": {}
|
||||
},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 8 within expression: foo[1].2"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+430
@@ -0,0 +1,430 @@
|
||||
{
|
||||
"boolean": [
|
||||
{ "expr": "true == true", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "false == false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false == true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"number": [
|
||||
{ "expr": "0 == -0", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "2 == 2", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "1.001 == 1.002", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "120 == 1.2e2", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "1 == 2", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "NaN == NaN", "result": { "kind": "Boolean", "value": false } },
|
||||
{
|
||||
"expr": "Infinity == Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity == Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 == Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 == Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"string": [
|
||||
{ "expr": "'a' == 'a'", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "'a' == 'b'", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"null": [
|
||||
{ "expr": "null == null", "result": { "kind": "Boolean", "value": true } }
|
||||
],
|
||||
|
||||
"object": [
|
||||
{
|
||||
"expr": "object1 == object1",
|
||||
"contexts": { "object1": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "object1 == object2",
|
||||
"contexts": { "object1": {}, "object2": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"array": [
|
||||
{
|
||||
"expr": "array1 == array1",
|
||||
"contexts": { "array1": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "array1 == array2",
|
||||
"contexts": { "array1": [], "array2": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_number": [
|
||||
{ "expr": "false == 0", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "true == 1", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "false == NaN", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "true == 2", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_bool_string": [
|
||||
{ "expr": "false == ''", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "false == ' '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false == ' 0.0 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true == ' 1.0 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true == ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false == '-1'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "true == '2'", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_bool_null": [
|
||||
{
|
||||
"expr": "false == null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true == null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_object-array": [
|
||||
{
|
||||
"expr": "false == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_bool": [
|
||||
{ "expr": "0 == false", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "1 == true", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "NaN == false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "2 == true", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_number_string": [
|
||||
{
|
||||
"expr": "0 == ' -0.0 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "0 == ''", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "0 == ' '", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "120 == ' +1.2e2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "120.0 == ' 1.2E2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "120 == ' 1.2e+2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "-120 == ' -1.2E+2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0.012 == ' 1.2e-2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0.012 == ' 1.2E-2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "255.0 == ' 0xff '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "8.0 == ' 0o10 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity == ' Infinity '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity == ' -Infinity '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "NaN == 'NaN'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "1 == '0'", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "1 == 'a'", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_number_null": [
|
||||
{ "expr": "0 == null", "result": { "kind": "Boolean", "value": true } }
|
||||
],
|
||||
|
||||
"coerce_number_object-array": [
|
||||
{
|
||||
"expr": "0 == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_bool": [
|
||||
{ "expr": "'' == false", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "' ' == false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0.0 ' == false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.0 ' == true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' == true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'-1' == false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "'2' == true", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_string_number": [
|
||||
{
|
||||
"expr": "' -0.0 ' == 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "'' == 0", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "' ' == 0", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "' +1.2e2 ' == 120",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2E2 ' == 120.0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2e+2 ' == 120",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' -1.2E+2 ' == -120",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2e-2 ' == 0.012",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2E-2 ' == 0.012",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0xff ' == 255.0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0o10 ' == 8.0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' Infinity ' == Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' -Infinity ' == -Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'NaN' == NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{ "expr": "'0' == 1", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "'a' == 1", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_string_null": [
|
||||
{ "expr": "'' == null", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "' ' == null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "'0' == null", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "'false' == null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'null' == null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_object": [
|
||||
{
|
||||
"expr": "'' == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'false' == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'0' == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'null' == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Object' == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_array": [
|
||||
{
|
||||
"expr": "'' == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'false' == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'0' == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'null' == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Array' == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_bool": [
|
||||
{
|
||||
"expr": "null == false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "null == true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_number": [
|
||||
{ "expr": "null == 0", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "false == 1", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"coerce_null_string": [
|
||||
{ "expr": "null == ''", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "null == ' '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "null == '0'", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "null == 'false'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null == 'null'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_object-array": [
|
||||
{
|
||||
"expr": "null == test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null == test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
]
|
||||
}
|
||||
+376
@@ -0,0 +1,376 @@
|
||||
{
|
||||
"bool": [
|
||||
{
|
||||
"expr": "false > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"number": [
|
||||
{
|
||||
"expr": "1 > 2",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 > 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 > 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1.002 > 1.001",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"string": [
|
||||
{
|
||||
"expr": "'def' > 'abc'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'a' > 'b'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"array": [
|
||||
{
|
||||
"expr": "test > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"object": [
|
||||
{
|
||||
"expr": "test > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_number": [
|
||||
{
|
||||
"expr": "false > 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false > -11",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true > 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false > Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false > -Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true > -Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_string": [
|
||||
{
|
||||
"expr": "false > '0'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false > '-1'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true > '1'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > '0'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_null": [
|
||||
{
|
||||
"expr": "false > null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_object": [
|
||||
{
|
||||
"expr": "false > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_array": [
|
||||
{
|
||||
"expr": "false > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_bool": [
|
||||
{
|
||||
"expr": "1 > false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 > true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "NaN > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "NaN > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity > false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity > true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_string": [
|
||||
{
|
||||
"expr": "0 > ' 0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 > ' -1 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 > ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 > ' 0 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_null": [
|
||||
{
|
||||
"expr": "1 > null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 > null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_object": [
|
||||
{
|
||||
"expr": "0 > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_array": [
|
||||
{
|
||||
"expr": "0 > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_bool": [
|
||||
{
|
||||
"expr": "'0' > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'1' > false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'1' > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'2' > true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_number": [
|
||||
{
|
||||
"expr": "' 0 ' > -1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0 ' > 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' > 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' > 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_null": [
|
||||
{
|
||||
"expr": "'' > null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'1' > null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_object": [
|
||||
{
|
||||
"expr": "'' > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_array": [
|
||||
{
|
||||
"expr": "'' > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_bool": [
|
||||
{
|
||||
"expr": "null > false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null > true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_number": [
|
||||
{
|
||||
"expr": "null > 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null > -1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_string": [
|
||||
{
|
||||
"expr": "null > ' 0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null > ' -1 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_object": [
|
||||
{
|
||||
"expr": "null > test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_array": [
|
||||
{
|
||||
"expr": "null > test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"bool": [
|
||||
{
|
||||
"expr": "false >= true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false >= false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true >= false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true >= true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
+354
@@ -0,0 +1,354 @@
|
||||
{
|
||||
"array-index-coercion": [
|
||||
{
|
||||
"expr": "foo[null]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "String", "value": "zero" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[false]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "String", "value": "zero" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[true]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "String", "value": "one" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[' 0.0 ']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "String", "value": "zero" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[' 0x02 ']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "String", "value": "two" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[' asdf ']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[fromjson('[]')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[fromjson('{}')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
}
|
||||
],
|
||||
"array-index-out-of-range": [
|
||||
{
|
||||
"expr": "foo[-1]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[3]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[-Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[NaN]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
}
|
||||
],
|
||||
"object-case-insensitive": [
|
||||
{
|
||||
"expr": "foo['bAr']",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"BaR": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "baz" }
|
||||
}
|
||||
],
|
||||
"object-index-coercion": [
|
||||
{
|
||||
"expr": "foo[5]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"5": "it's 5"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's 5" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[.5]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"0.5": "it's 0.5"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's 0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[-.5]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"-0.5": "it's -0.5"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's -0.5" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[0x0f]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"15": "it's 15"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's 15" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[NaN]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"NaN": "it's NaN"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's NaN" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[Infinity]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Infinity": "it's Infinity"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[-Infinity]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"-Infinity": "it's -Infinity"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's -Infinity" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[null]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"": "it's null"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's null" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[true]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"true": "it's true"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's true" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[false]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"false": "it's false"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "it's false" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[fromJson('{}')]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Object": "It's Object"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[format('{0}', fromJson('{}'))]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Object": "It's Object"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "It's Object" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[fromJson('[]')]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Array": "It's Array"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo[format('{0}', fromJson('[]'))]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"Array": "It's Array"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "It's Array" }
|
||||
}
|
||||
],
|
||||
"object-index-out-of-range": [
|
||||
{
|
||||
"expr": "foo['']",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo['asdf']",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"bar": "baz"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Null", "value": null }
|
||||
}
|
||||
],
|
||||
"index-following-function": [
|
||||
{
|
||||
"expr": "fromJson('[\"one\", \"two\"]')[1]",
|
||||
"result": { "kind": "String", "value": "two" }
|
||||
}
|
||||
],
|
||||
"index-following-group": [
|
||||
{
|
||||
"expr": "(fromJson('[\"one\", \"two\"]'))[1]",
|
||||
"result": { "kind": "String", "value": "two" }
|
||||
}
|
||||
],
|
||||
"index-star": [
|
||||
{
|
||||
"expr": "foo[*]",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"one": "one val",
|
||||
"two": "two val",
|
||||
"*": "star val"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one val", "two val", "star val"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo['*']",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"one": "one val",
|
||||
"two": "two val",
|
||||
"*": "star val"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "String", "value": "star val" }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one", "two"] }
|
||||
}
|
||||
]
|
||||
}
|
||||
+556
@@ -0,0 +1,556 @@
|
||||
{
|
||||
"filtered-array-from-literal": [
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": null
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": false
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": true
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": 123
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": "abc"
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
}
|
||||
],
|
||||
"filtered-array-from-array": [
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
"zero",
|
||||
"one"
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["zero", "one"] }
|
||||
}
|
||||
],
|
||||
"filtered-array-from-object": [
|
||||
{
|
||||
"expr": "foo.*",
|
||||
"contexts": {
|
||||
"foo": {
|
||||
"one": "one val",
|
||||
"two": "two val"
|
||||
}
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one val", "two val"] }
|
||||
}
|
||||
],
|
||||
"nested-object": [
|
||||
{
|
||||
"expr": "foo.*.one",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"one": "obj_1_prop_1",
|
||||
"two": "obj_1_prop_2"
|
||||
},
|
||||
{
|
||||
"one": "obj_2_prop_1",
|
||||
"two": "obj_2_prop_2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["obj_1_prop_1", "obj_2_prop_1"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*]['']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"": "empty string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["empty string"] }
|
||||
}
|
||||
],
|
||||
"nested-object-property-case-insensitive": [
|
||||
{
|
||||
"expr": "foo.*.thePROPERTY",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"THEproperty": "the property"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["the property"] }
|
||||
}
|
||||
],
|
||||
"nested-object-property-not-found": [
|
||||
{
|
||||
"expr": "foo.*.one",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"one": "obj_1_prop_1",
|
||||
"two": "obj_1_prop_2"
|
||||
},
|
||||
{
|
||||
"zero": "obj_2_prop_0",
|
||||
"three": "obj_2_prop_3"
|
||||
},
|
||||
{
|
||||
"one": "obj_3_prop_1",
|
||||
"two": "obj_3_prop_2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["obj_1_prop_1", "obj_3_prop_1"] }
|
||||
}
|
||||
],
|
||||
"nested-object-property-coercion": [
|
||||
{
|
||||
"expr": "foo[*][null]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"": "empty string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["empty string"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][false]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"false": "It's false"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["It's false"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][true]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"true": "It's true"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["It's true"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][0x0f]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"15": "fifteen"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["fifteen"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][NaN]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"NaN": "It's NaN"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["It's NaN"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"Infinity": "It's Infinity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["It's Infinity"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][-Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"-Infinity": "It's -Infinity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["It's -Infinity"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][fromjson('[]')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"": "empty string",
|
||||
"Array": "It's array"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][fromjson('{}')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"": "empty string",
|
||||
"Object": "It's object"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
}
|
||||
],
|
||||
"nested-array": [
|
||||
{
|
||||
"expr": "foo[*][1]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"ary_0_idx_0",
|
||||
"ary_0_idx_1",
|
||||
"ary_0_idx_2"
|
||||
],
|
||||
[
|
||||
"ary_1_idx_0",
|
||||
"ary_1_idx_1",
|
||||
"ary_1_idx_2"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["ary_0_idx_1", "ary_1_idx_1"] }
|
||||
}
|
||||
],
|
||||
"nested-array-index-not-found": [
|
||||
{
|
||||
"expr": "foo[*][1]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"ary_0_idx_0",
|
||||
"ary_0_idx_1",
|
||||
"ary_0_idx_2"
|
||||
],
|
||||
[
|
||||
"ary_1_idx_0"
|
||||
],
|
||||
[
|
||||
"ary_2_idx_0",
|
||||
"ary_2_idx_1",
|
||||
"ary_2_idx_2"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["ary_0_idx_1", "ary_2_idx_1"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][-1]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][NaN]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][Infinity]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
}
|
||||
],
|
||||
"nested-array-index-coercion": [
|
||||
{
|
||||
"expr": "foo[*][null]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["zero"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][false]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["zero"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][true]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*]['']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["zero"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*]['abc']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][' 0x01 ']",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["one"] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][fromjson('[]')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][fromjson('{}')]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
}
|
||||
],
|
||||
"double-star": [
|
||||
{
|
||||
"expr": "foo.*.*",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
null,
|
||||
false,
|
||||
true,
|
||||
123,
|
||||
"hello",
|
||||
[
|
||||
"zero",
|
||||
"one",
|
||||
"two"
|
||||
],
|
||||
{
|
||||
"p1": "v1",
|
||||
"p2": "v2",
|
||||
"p3": "v3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["zero", "one", "two", "v1", "v2", "v3"] }
|
||||
}
|
||||
],
|
||||
"double-property": [
|
||||
{
|
||||
"expr": "foo.*.p.nestedp",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
{
|
||||
"p": {
|
||||
"nestedp": "val 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"p": {
|
||||
"nestedp": "val 2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["val 1", "val 2"] }
|
||||
}
|
||||
],
|
||||
"double-index": [
|
||||
{
|
||||
"expr": "foo[*][1][2]",
|
||||
"contexts": {
|
||||
"foo": [
|
||||
[
|
||||
[
|
||||
"0_0_0",
|
||||
"0_0_1",
|
||||
"0_0_2",
|
||||
"0_0_3"
|
||||
],
|
||||
[
|
||||
"0_1_0",
|
||||
"0_1_1",
|
||||
"0_1_2",
|
||||
"0_1_3"
|
||||
],
|
||||
[
|
||||
"0_2_0",
|
||||
"0_2_1",
|
||||
"0_2_2",
|
||||
"0_2_3"
|
||||
]
|
||||
],
|
||||
[
|
||||
[
|
||||
"1_0_0",
|
||||
"1_0_1",
|
||||
"1_0_2",
|
||||
"1_0_3"
|
||||
],
|
||||
[
|
||||
"1_1_0",
|
||||
"1_1_1",
|
||||
"1_1_2",
|
||||
"1_1_3"
|
||||
],
|
||||
[
|
||||
"1_2_0",
|
||||
"1_2_1",
|
||||
"1_2_2",
|
||||
"1_2_3"
|
||||
]
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": { "kind": "Array", "value": ["0_1_2", "1_1_2"] }
|
||||
}
|
||||
],
|
||||
"not-found-always-returns-empty-array": [
|
||||
{
|
||||
"expr": "foo[*][1]",
|
||||
"contexts": {
|
||||
"foo": []
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[*][1][2]",
|
||||
"contexts": {
|
||||
"foo": []
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*.bar",
|
||||
"contexts": {
|
||||
"foo": {}
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo.*.bar.baz",
|
||||
"contexts": {
|
||||
"foo": []
|
||||
},
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
}
|
||||
]
|
||||
}
|
||||
+378
@@ -0,0 +1,378 @@
|
||||
{
|
||||
"bool": [
|
||||
{
|
||||
"expr": "false < true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"number": [
|
||||
{
|
||||
"expr": "1 < 2",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 < 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 < 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1.001 < 1.002",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"string": [
|
||||
{
|
||||
"expr": "'abc' < 'def'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'b' < 'a'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"array": [
|
||||
{
|
||||
"expr": "test < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"object": [
|
||||
{
|
||||
"expr": "test < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_number": [
|
||||
{
|
||||
"expr": "false < 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true < 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < 2",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < NaN",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false < Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true < Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false < -Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < -Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_string": [
|
||||
{
|
||||
"expr": "false < '0'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false < '1'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true < '1'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < '2'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_null": [
|
||||
{
|
||||
"expr": "false < null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_object": [
|
||||
{
|
||||
"expr": "false < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_array": [
|
||||
{
|
||||
"expr": "false < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_bool": [
|
||||
{
|
||||
"expr": "-1 < false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 < true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 < true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "NaN < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "NaN < true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity < true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity < false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity < true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_string": [
|
||||
{
|
||||
"expr": "0 < ' 0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 < ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 < ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 < ' 2 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_null": [
|
||||
{
|
||||
"expr": "-1 < null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 < null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_object": [
|
||||
{
|
||||
"expr": "0 < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-1 < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_array": [
|
||||
{
|
||||
"expr": "0 < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-1 < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_bool": [
|
||||
{
|
||||
"expr": "'0' < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'-1' < false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'1' < true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'0' < true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_number": [
|
||||
{
|
||||
"expr": "' 0 ' < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 0 ' < 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' < 2",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' < 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_null": [
|
||||
{
|
||||
"expr": "'' < null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'-1' < null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_object": [
|
||||
{
|
||||
"expr": "'' < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_array": [
|
||||
{
|
||||
"expr": "'' < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_bool": [
|
||||
{
|
||||
"expr": "null < false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null < true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_number": [
|
||||
{
|
||||
"expr": "null < 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_string": [
|
||||
{
|
||||
"expr": "null < ' 0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null < ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_object": [
|
||||
{
|
||||
"expr": "null < test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_array": [
|
||||
{
|
||||
"expr": "null < test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
]
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"bool": [
|
||||
{
|
||||
"expr": "false <= true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false <= false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true <= false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true <= true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
+597
@@ -0,0 +1,597 @@
|
||||
{
|
||||
"boolean": [
|
||||
{
|
||||
"expr": "true != true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true != true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"number": [
|
||||
{
|
||||
"expr": "0 != -0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 != 2",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "120 != 1.2e2",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 != 2",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1.001 != 1.002",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "NaN != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity != Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity != Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 != Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != Infinity",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"string": [
|
||||
{
|
||||
"expr": "'a' != 'a'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'a' != 'b'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"null": [
|
||||
{ "expr": "null != null", "result": { "kind": "Boolean", "value": false } }
|
||||
],
|
||||
|
||||
"object": [
|
||||
{
|
||||
"expr": "object1 != object1",
|
||||
"contexts": { "object1": {} },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "object1 != object2",
|
||||
"contexts": { "object1": {}, "object2": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"array": [
|
||||
{
|
||||
"expr": "array1 != array1",
|
||||
"contexts": { "array1": [] },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "array1 != array2",
|
||||
"contexts": { "array1": [], "array2": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_number": [
|
||||
{
|
||||
"expr": "false != 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != 2",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_string": [
|
||||
{
|
||||
"expr": "false != ''",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != ' '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != ' 0.0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != ' 1.0 '",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != ' 1.0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true != ' 1 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "false != '-1'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != '2'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_null": [
|
||||
{
|
||||
"expr": "false != null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "true != null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_bool_object-array": [
|
||||
{
|
||||
"expr": "false != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "false != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "true != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_bool": [
|
||||
{
|
||||
"expr": "0 != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 != false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 != true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "NaN != false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_string": [
|
||||
{
|
||||
"expr": "0 != ' -0.0 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 != ''",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 != ' '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "120 != ' +1.2e2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "120.0 != ' 1.2E2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "120 != ' 1.2e+2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-120 != ' -1.2E+2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0.012 != ' 1.2e-2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0.012 != ' 1.2E-2 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "255.0 != ' 0xff '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "8.0 != ' 0o10 '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "Infinity != ' Infinity '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "-Infinity != ' -Infinity '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "NaN != 'NaN'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != '0'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != '1'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 != 'a'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 != 'a'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_null": [
|
||||
{
|
||||
"expr": "0 != null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 != null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_number_object-array": [
|
||||
{
|
||||
"expr": "0 != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "1 != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_bool": [
|
||||
{
|
||||
"expr": "'' != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' ' != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 0.0 ' != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.0 ' != false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.0 ' != true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1 ' != true",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'-1' != true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'2' != true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_number": [
|
||||
{
|
||||
"expr": "' -0.0 ' != 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'' != 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' ' != 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' +1.2e2 ' != 120",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2E2 ' != 120.0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2e+2 ' != 120",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' -1.2E+2 ' != -120",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2e-2 ' != 0.012",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 1.2E-2 ' != 0.012",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 0xff ' != 255.0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' 0o10 ' != 8.0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' Infinity ' != Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' -Infinity ' != -Infinity",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'NaN' != NaN",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'0' != 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'1' != 1",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'a' != 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'a' != 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_null": [
|
||||
{
|
||||
"expr": "'' != null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "' ' != null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'0' != null",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'1' != null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'false' != null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'null' != null",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_object": [
|
||||
{
|
||||
"expr": "'' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'false' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'0' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'1' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'null' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Object' != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_string_array": [
|
||||
{
|
||||
"expr": "'' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'false' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'0' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'0' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'null' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Array' != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_bool": [
|
||||
{
|
||||
"expr": "null != false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null != true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_number": [
|
||||
{
|
||||
"expr": "null != 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null != 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_string": [
|
||||
{
|
||||
"expr": "null != ''",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null != ' '",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null != '0'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "null != '1'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "null != 'false'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "null != 'null'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"coerce_null_object-array": [
|
||||
{
|
||||
"expr": "null != test",
|
||||
"contexts": { "test": {} },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "null != test",
|
||||
"contexts": { "test": [] },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"not": [
|
||||
{ "expr": "!!true", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!false", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!1", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!.5", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!0.5", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!2", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!-1", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!-.5", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!-2", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!-Infinity", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!Infinity", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!NaN", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!0", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!0.0", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!-0", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!-0.0", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!'a'", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!'false'", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!'0'", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!' '", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!''", "result": { "kind": "Boolean", "value": false } },
|
||||
{ "expr": "!!fromJson('[]')", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!fromJson('{}')", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "!!null", "result": { "kind": "Boolean", "value": false } }
|
||||
]
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"or": [
|
||||
{
|
||||
"expr": "true || true || true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "true || true", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "true || true || false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{ "expr": "true || false", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "false || true", "result": { "kind": "Boolean", "value": true } },
|
||||
{
|
||||
"expr": "false || false",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "0 || 0 || 2 || 3",
|
||||
"result": { "kind": "Number", "value": 2.0 }
|
||||
},
|
||||
{ "expr": "false || 0", "result": { "kind": "Number", "value": 0.0 } },
|
||||
{
|
||||
"expr": "false || '' || 'a' || 'b'",
|
||||
"result": { "kind": "String", "value": "a" }
|
||||
},
|
||||
{ "expr": "false || ''", "result": { "kind": "String", "value": "" } },
|
||||
{ "expr": "null || true", "result": { "kind": "Boolean", "value": true } },
|
||||
{ "expr": "false || null", "result": { "kind": "Null", "value": null } }
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,376 @@
|
||||
{
|
||||
"lower-vs-upper": [
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' == 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' != 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' < 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' <= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' > 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'abcdefghijklmnopqrstuvwxyz' >= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"upper-vs-lower": [
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' == 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' != 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' < 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' <= 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' > 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ABCDEFGHIJKLMNOPQRSTUVWXYZ' >= 'abcdefghijklmnopqrstuvwxyz'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"a-z-equivalent-to-A-Z-wrt-chars-between-Z-and-a": [
|
||||
{
|
||||
"expr": "'A' < '['",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'A' <= '['",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'A' > '['",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'A' >= '['",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'a' < '['",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'a' <= '['",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'a' > '['",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'a' >= '['",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ς-(final-lowercase-sigma)-Σ-(capital-sigma)-σ-(non-final-sigma)": [
|
||||
{
|
||||
"expr": "'ς' == 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' != 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' < 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' <= 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' > 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' >= 'Σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' == 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' != 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' < 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' <= 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' > 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ς' >= 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' == 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' != 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' < 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' <= 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' > 'σ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Σ' >= 'σ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ü-Ü": [
|
||||
{
|
||||
"expr": "'ü' == 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ü' != 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ü' < 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ü' <= 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ü' > 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ü' >= 'Ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' == 'ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' != 'ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' < 'ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' <= 'ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' > 'ü'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ü' >= 'ü'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ç-Ç": [
|
||||
{
|
||||
"expr": "'ç' == 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ç' != 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ç' < 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ç' <= 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ç' > 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ç' >= 'Ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' == 'ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' != 'ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' < 'ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' <= 'ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' > 'ç'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'Ç' >= 'ç'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-i-İ": [
|
||||
{
|
||||
"expr": "'i' == 'İ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'i' != 'İ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'i' < 'İ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'i' <= 'İ'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'i' > 'İ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'i' >= 'İ'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' == 'i'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' != 'i'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' < 'i'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' <= 'i'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' > 'i'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'İ' >= 'i'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-ı-I": [
|
||||
{
|
||||
"expr": "'ı' == 'I'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ı' != 'I'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ı' < 'I'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ı' <= 'I'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'ı' > 'I'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'ı' >= 'I'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'I' == 'ı'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'I' != 'ı'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'I' < 'ı'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'I' <= 'ı'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "'I' > 'ı'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'I' >= 'ı'",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"cyrillic-letters": [
|
||||
{
|
||||
"expr": "'АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЭЮЯ' == 'абвгдежзийклмнопрстуфхцчшщьэюя'",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
{
|
||||
"operator_precedence_._and_._evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "foo.bar.baz",
|
||||
"contexts": { "foo": { "bar": { "baz": 2 } } },
|
||||
"result": { "kind": "Number", "value": 2.0 }
|
||||
}
|
||||
],
|
||||
"operator_precedence_._is_higher_than_!": [
|
||||
{
|
||||
"expr": "!foo.bar",
|
||||
"contexts": { "foo": { "bar": true } },
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "(!foo).bar",
|
||||
"contexts": { "foo": { "bar": true } },
|
||||
"result": { "kind": "Null", "value": null }
|
||||
}
|
||||
],
|
||||
"operator_precedence_._is_higher_than_>": [
|
||||
{
|
||||
"expr": "3 > foo.bar",
|
||||
"contexts": { "foo": { "bar": 2 } },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "foo.bar > 2",
|
||||
"contexts": { "foo": { "bar": 3 } },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"operator_precedence_[]_is_higher_than_>": [
|
||||
{
|
||||
"expr": "3 > foo['bar']",
|
||||
"contexts": { "foo": { "bar": 2 } },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "foo['bar'] > 2",
|
||||
"contexts": { "foo": { "bar": 3 } },
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"operator_precedence_!_is_higher_than_<": [
|
||||
{
|
||||
"expr": "!2 < 3",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "!(2 < 3)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_<_and_<_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "3 < 2 < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "3 < (2 < 1)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_<_and_<=_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "3 < 2 <= 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "3 < (2 <= 1)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_<=_and_<_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "3 <= 2 < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "3 <= (2 < 1)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_>_and_<_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "0 > 0 < 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "0 > (0 < 1)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_>_and_>_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "2 > 2 > 0",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "2 > (2 > 0)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
"operator_precedence_<=_is_higher_than_==": [
|
||||
{
|
||||
"expr": "2 <= 3 == true",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "2 <= (3 == true)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_==_and_==_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "2 == 2 == 1",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "2 == (2 == 1)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_==_and_!=_evaluate_left_to_right": [
|
||||
{
|
||||
"expr": "2 == 2 != 0",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "2 == (2 != 0)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_==_is_higher_than_&&": [
|
||||
{
|
||||
"expr": "1 == 1 && 2",
|
||||
"result": { "kind": "Number", "value": 2.0 }
|
||||
},
|
||||
{
|
||||
"expr": "1 == (1 && 2)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "'a' == 'a' && 'b'",
|
||||
"result": { "kind": "String", "value": "b" }
|
||||
},
|
||||
{
|
||||
"expr": "'a' == ('a' && 'b')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
"operator_precedence_&&_is_higher_than_||": [
|
||||
{
|
||||
"expr": "false && 0 || null",
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "false && (0 || null)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "1 || 2 && 3",
|
||||
"result": { "kind": "Number", "value": 1.0 }
|
||||
},
|
||||
{
|
||||
"expr": "(1 || 2) && 3",
|
||||
"result": { "kind": "Number", "value": 3.0 }
|
||||
}
|
||||
]
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
{
|
||||
"basics": [
|
||||
{
|
||||
"expr": "startsWith('abcdef', 'abc')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('abcdef', 'bc')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('abcdef', '')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('1234', 12)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('true', true)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('false', false)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('asdf', null)",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('1234', 23)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('true', false)",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('true', false, true)",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Too many parameters supplied: "
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('true')",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Too few parameters supplied: "
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-a-thru-z": [
|
||||
{
|
||||
"expr": "startsWith('ABCDEFGHIJKLMNOPQRSTUVWXYZ_asdf', 'abcdefghijklmnopqrstuvwxyz')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('abcdefghijklmnopqrstuvwxyz_asdf', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ς-(final-lowercase-sigma)-Σ-(capital-sigma)-σ-(non-final-sigma)": [
|
||||
{
|
||||
"expr": "startsWith('ς_asdf', 'Σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('ς_asdf', 'σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('Σ_asdf', 'ς')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('Σ_asdf', 'σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('σ_asdf', 'ς')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('σ_asdf', 'Σ')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ü-Ü": [
|
||||
{
|
||||
"expr": "startsWith('ü_asdf', 'Ü')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('Ü_asdf', 'ü')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-insensitive-ç-Ç": [
|
||||
{
|
||||
"expr": "startsWith('ç_asdf', 'Ç')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('Ç_asdf', 'ç')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-i-İ": [
|
||||
{
|
||||
"expr": "startsWith('i_asdf', 'İ')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('İ_asdf', 'i')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"case-sensitive-ı-I": [
|
||||
{
|
||||
"expr": "startsWith('ı_asdf', 'I')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
},
|
||||
{
|
||||
"expr": "startsWith('I_asdf', 'ı')",
|
||||
"result": { "kind": "Boolean", "value": false }
|
||||
}
|
||||
],
|
||||
|
||||
"cyrillic-letters": [
|
||||
{
|
||||
"expr": "startsWith('АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЭЮЯ_asdf', 'абвгдежзийклмнопрстуфхцчшщьэюя')",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
}
|
||||
]
|
||||
}
|
||||
+605
@@ -0,0 +1,605 @@
|
||||
{
|
||||
"parsing-errors": [
|
||||
{
|
||||
"expr": "1 <",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected end of expression: '<'. Located at position 3 within expression: 1 <"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 < )",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: ')'. Located at position 5 within expression: 1 < )"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "> 1",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '>'. Located at position 1 within expression: > 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github.()",
|
||||
"contexts": { "github": { "sha": "abc123" } },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '('. Located at position 8 within expression: github.()"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "endswith(1, 2 a)",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: 'a'. Located at position 15 within expression: endswith(1, 2 a)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "(1,",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: ','. Located at position 3 within expression: (1,"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 2",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 3 within expression: 1 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "(1)2",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 4 within expression: (1)2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(1)2",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 10 within expression: tojson(1)2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo 2",
|
||||
"contexts": { "foo": "bar" },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 5 within expression: foo 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo.bar 2",
|
||||
"contexts": { "foo": "bar" },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 9 within expression: foo.bar 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo['bar']2",
|
||||
"contexts": { "foo": "bar" },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected symbol: '2'. Located at position 11 within expression: foo['bar']2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "nonExistentFunction()",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized function: 'nonExistentFunction'. Located at position 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "false && nonExistentFunction()",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized function: 'nonExistentFunction'. Located at position 1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 = < 2",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '='. Located at position 3 within expression: 1 = < 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 & < 2",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '&'. Located at position 3 within expression: 1 & < 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 | < 2",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '|'. Located at position 3 within expression: 1 | < 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 =2 =3",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '=2'. Located at position 3 within expression: 1 =2 =3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 &2 &3",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '&2'. Located at position 3 within expression: 1 &2 &3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 |2 |3",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '|2'. Located at position 3 within expression: 1 |2 |3"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 @abc 2",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '@abc'. Located at position 3 within expression: 1 @abc 2"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "'foo",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: ''foo'. Located at position 1 within expression: 'foo"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "fromjson(a,b ",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'a'. Located at position 10 within expression: fromjson(a,b "
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": " true ||( false && false",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unexpected end of expression: 'false'. Located at position 20 within expression: true ||( false && false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "😊 Emoji!! (unicode)",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '😊'. Located at position 1 within expression: 😊 Emoji!! (unicode)"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github.event_name == 'push'\n && !contains(env.COMMIT_MESSAGES)",
|
||||
"contexts": { "github": { "event_name": "push" }},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'env'. Located at position 43 within expression: github.event_name == 'push'\n && !contains(env.COMMIT_MESSAGES)"
|
||||
},
|
||||
"options": {
|
||||
"skip": ["typescript"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github.event_name == 'push' \n&& true\n&& !contains(env.COMMIT_MESSAGES)",
|
||||
"contexts": { "github": { "event_name": "push" }},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'env'. Located at position 51 within expression: github.event_name == 'push' \n&& true\n&& !contains(env.COMMIT_MESSAGES)"
|
||||
},
|
||||
"options": {
|
||||
"skip": ["typescript"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github.event_name == 'push' \n&& true\n&& true\n&& !contains(env.COMMIT_MESSAGES)",
|
||||
"contexts": { "github": { "event_name": "push" }},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'env'. Located at position 59 within expression: github.event_name == 'push' \n&& true\n&& true\n&& !contains(env.COMMIT_MESSAGES)"
|
||||
},
|
||||
"options": {
|
||||
"skip": ["typescript"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github.event_name == 'push' \n&& true\n&& true\n&& true\n&& !contains(env.COMMIT_MESSAGES)",
|
||||
"contexts": { "github": { "event_name": "push" }},
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Unrecognized named-value: 'env'. Located at position 67 within expression: github.event_name == 'push' \n&& true\n&& true\n&& true\n&& !contains(env.COMMIT_MESSAGES)"
|
||||
},
|
||||
"options": {
|
||||
"skip": ["typescript"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "1 && ..github/workflow.md",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '..github/workflow.md'. Located at position 6 within expression: 1 && ..github/workflow.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "..github/workflow.md",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '..github/workflow.md'. Located at position 1 within expression: ..github/workflow.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": ".github/workflow.md",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '.github/workflow.md'. Located at position 1 within expression: .github/workflow.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": ".github/workflow",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '.github/workflow'. Located at position 1 within expression: .github/workflow"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "github/workflow.md",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: 'github/workflow'. Located at position 1 within expression: github/workflow.md"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "..github/workflow.md && 1",
|
||||
"err": {
|
||||
"kind": "lexing",
|
||||
"value": "Unexpected symbol: '..github/workflow.md'. Located at position 1 within expression: ..github/workflow.md && 1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"depth-errors": [
|
||||
{
|
||||
"expr": "!!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! false",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "!!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!!! !!!! false",
|
||||
"result": { "kind": "Boolean", "value": true }
|
||||
},
|
||||
{
|
||||
"expr": "foo._1._2._3._4._5._6._7._8._9._10._11._12._13._14._15._16._17._18._19._20._21._22._23._24._25._26._27._28._29._30._31._32._33._34._35._36._37._38._39._40._41._42._43._44._45._46._47._48._49._50",
|
||||
"contexts": { "foo": null },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo._1._2._3._4._5._6._7._8._9._10._11._12._13._14._15._16._17._18._19._20._21._22._23._24._25._26._27._28._29._30._31._32._33._34._35._36._37._38._39._40._41._42._43._44._45._46._47._48._49",
|
||||
"contexts": { "foo": null },
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.*",
|
||||
"contexts": { "foo": null },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*.* .*.*.*.*",
|
||||
"contexts": { "foo": null },
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "foo[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45][46][47][48][49][50]",
|
||||
"contexts": { "foo": null },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37][38][39][40][41][42][43][44][45][46][47][48][49]",
|
||||
"contexts": { "foo": null },
|
||||
"result": { "kind": "Null", "value": null }
|
||||
},
|
||||
{
|
||||
"expr": "foo [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*]",
|
||||
"contexts": { "foo": null },
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "foo [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*][*] [*][*][*][*]",
|
||||
"contexts": { "foo": null },
|
||||
"result": { "kind": "Array", "value": [] }
|
||||
},
|
||||
{
|
||||
"expr": "fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( 1 )))))))))) )))))))))) )))))))))) )))))))))) ))))))))))",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson( fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson(tojson(fromjson( '1' ))))))))) )))))))))) )))))))))) )))))))))) ))))))))))",
|
||||
"result": { "kind": "Number", "value": 1 }
|
||||
},
|
||||
{
|
||||
"expr": "format('depth3'||format('depth5'||format('depth7'||format('depth9'||format('depth11'||format('depth13'||format('depth15'||format('depth17'||format('depth19'||format('depth21'||format('depth23'||format('depth25'||format('depth27'||format('depth29'||format('depth31'||format('depth33'||format('depth35'||format('depth37'||format('depth39'||format('depth41'||format('depth43'||format('depth45'||format('depth47'||format('depth49'||format('depth51'||'depth51')))))))))) )))))))))) )))))",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('depth3'||format('depth5'||format('depth7'||format('depth9'||format('depth11'||format('depth13'||format('depth15'||format('depth17'||format('depth19'||format('depth21'||format('depth23'||format('depth25'||format('depth27'||format('depth29'||format('depth31'||format('depth33'||format('depth35'||format('depth37'||format('depth39'||format('depth41'||format('depth43'||format('depth45'||format('depth47'||format('depth49'||format('depth50')))))))))) )))))))))) )))))",
|
||||
"result": { "kind": "String", "value": "depth3" }
|
||||
},
|
||||
{
|
||||
"expr": "format('depth3'&&format('depth5'&&format('depth7'&&format('depth9'&&format('depth11'&&format('depth13'&&format('depth15'&&format('depth17'&&format('depth19'&&format('depth21'&&format('depth23'&&format('depth25'&&format('depth27'&&format('depth29'&&format('depth31'&&format('depth33'&&format('depth35'&&format('depth37'&&format('depth39'&&format('depth41'&&format('depth43'&&format('depth45'&&format('depth47'&&format('depth49'&&format('depth51'&&'depth51')))))))))) )))))))))) )))))",
|
||||
"err": {
|
||||
"kind": "parsing",
|
||||
"value": "Exceeded max expression depth 50"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "format('depth3'&&format('depth5'&&format('depth7'&&format('depth9'&&format('depth11'&&format('depth13'&&format('depth15'&&format('depth17'&&format('depth19'&&format('depth21'&&format('depth23'&&format('depth25'&&format('depth27'&&format('depth29'&&format('depth31'&&format('depth33'&&format('depth35'&&format('depth37'&&format('depth39'&&format('depth41'&&format('depth43'&&format('depth45'&&format('depth47'&&format('depth49'&&format('depth50')))))))))) )))))))))) )))))",
|
||||
"result": { "kind": "String", "value": "depth50" }
|
||||
},
|
||||
{
|
||||
"expr": "1 || 2 || 3 || 4 || 5 || 6 || 7 || 8 || 9 || 10 || 11 || 12 || 13 || 14 || 15 || 16 || 17 || 18 || 19 || 20 || 21 || 22 || 23 || 24 || 25 || 26 || 27 || 28 || 29 || 30 || 31 || 32 || 33 || 34 || 35 || 36 || 37 || 38 || 39 || 40 || 41 || 42 || 43 || 44 || 45 || 46 || 47 || 48 || 49 || 50 || 51 || 52 || 53 || 54 || 55 || 56 || 57 || 58 || 59 || 60",
|
||||
"result": { "kind": "Number", "value": 1 }
|
||||
},
|
||||
{
|
||||
"expr": "1 && 2 && 3 && 4 && 5 && 6 && 7 && 8 && 9 && 10 && 11 && 12 && 13 && 14 && 15 && 16 && 17 && 18 && 19 && 20 && 21 && 22 && 23 && 24 && 25 && 26 && 27 && 28 && 29 && 30 && 31 && 32 && 33 && 34 && 35 && 36 && 37 && 38 && 39 && 40 && 41 && 42 && 43 && 44 && 45 && 46 && 47 && 48 && 49 && 50 && 51 && 52 && 53 && 54 && 55 && 56 && 57 && 58 && 59 && 60",
|
||||
"result": { "kind": "Number", "value": 60 }
|
||||
},
|
||||
{
|
||||
"expr": "1 && 2 || 3 && 4 || 5 && 6 || 7 && 8 || 9 && 10 || 11 && 12 || 13 && 14 || 15 && 16 || 17 && 18 || 19 && 20 || 21 && 22 || 23 && 24 || 25 && 26 || 27 && 28 || 29 && 30 || 31 && 32 || 33 && 34 || 35 && 36 || 37 && 38 || 39 && 40 || 41 && 42 || 43 && 44 || 45 && 46 || 47 && 48 || 49 && 50 || 51 && 52 || 53 && 54 || 55 && 56 || 57 && 58 || 59 && 60",
|
||||
"result": { "kind": "Number", "value": 2 }
|
||||
}
|
||||
],
|
||||
"memory-errors": [
|
||||
{
|
||||
"options": {
|
||||
"skip": ["typescript"]
|
||||
},
|
||||
"expr": "startswith(format('{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}', tojson(github)), format('{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}{0}', tojson(github)))",
|
||||
"contexts": {
|
||||
"github": {
|
||||
"ref": "refs/heads/main",
|
||||
"sha": "2ce6b095f4cceb616efed52266e3e3c0367ba795",
|
||||
"repository": "monalisa/testing",
|
||||
"repository_owner": "monalisa",
|
||||
"repository_owner_id": "12102068",
|
||||
"repositoryUrl": "git://github.com/monalisa/testing.git",
|
||||
"run_id": "2827197126",
|
||||
"run_number": "845",
|
||||
"retention_days": "90",
|
||||
"run_attempt": "1",
|
||||
"artifact_cache_size_limit": "10",
|
||||
"repository_visibility": "public",
|
||||
"repository_id": "1",
|
||||
"actor_id": "1",
|
||||
"actor": "monalisa",
|
||||
"triggering_actor": "monalisa",
|
||||
"workflow": "CI",
|
||||
"head_ref": "",
|
||||
"base_ref": "",
|
||||
"event_name": "push",
|
||||
"event": {
|
||||
"after": "2ce6b095f4cceb616efed52266e3e3c0367ba795",
|
||||
"base_ref": null,
|
||||
"before": "bbe29778fdad33232cd67bd84205d334b94412d7",
|
||||
"commits": [
|
||||
{
|
||||
"author": {
|
||||
"email": "monalisa@users.noreply.github.com",
|
||||
"name": "mona",
|
||||
"username": "monalisa"
|
||||
},
|
||||
"committer": {
|
||||
"email": "noreply@github.com",
|
||||
"name": "GitHub",
|
||||
"username": "web-flow"
|
||||
},
|
||||
"distinct": true,
|
||||
"id": "2ce6b095f4cceb616efed52266e3e3c0367ba795",
|
||||
"message": "Update main.yml",
|
||||
"timestamp": "2022-08-09T12:40:12-05:00",
|
||||
"tree_id": "0dfd49aedd0cc103865d00587df3d23aa6f571f7",
|
||||
"url": "https://github.com/monalisa/testing/commit/2ce6b095f4cceb616efed52266e3e3c0367ba795"
|
||||
}
|
||||
],
|
||||
"compare": "https://github.com/monalisa/testing/compare/bbe29778fdad...2ce6b095f4cc",
|
||||
"created": false,
|
||||
"deleted": false,
|
||||
"forced": false,
|
||||
"head_commit": {
|
||||
"author": {
|
||||
"email": "monalisa@users.noreply.github.com",
|
||||
"name": "mona",
|
||||
"username": "monalisa"
|
||||
},
|
||||
"committer": {
|
||||
"email": "noreply@github.com",
|
||||
"name21": "GitHub",
|
||||
"username": "web-flow"
|
||||
},
|
||||
"distinct": true,
|
||||
"id": "2ce6b095f4cceb616efed52266e3e3c0367ba795",
|
||||
"message": "Update main.yml",
|
||||
"timestamp": "2022-08-09T12:40:12-05:00",
|
||||
"tree_id": "0dfd49aedd0cc103865d00587df3d23aa6f571f7",
|
||||
"url": "https://github.com/monalisa/testing/commit/2ce6b095f4cceb616efed52266e3e3c0367ba795"
|
||||
},
|
||||
"pusher": {
|
||||
"email": "monalisa@users.noreply.github.com",
|
||||
"name": "monalisa"
|
||||
},
|
||||
"ref": "refs/heads/main",
|
||||
"repository": {
|
||||
"allow_forking": true,
|
||||
"archive_url": "https://api.github.com/repos/monalisa/testing/{archive_format}{/ref}",
|
||||
"archived": false,
|
||||
"assignees_url": "https://api.github.com/repos/monalisa/testing/assignees{/user}",
|
||||
"blobs_url": "https://api.github.com/repos/monalisa/testing/git/blobs{/sha}",
|
||||
"branches_url": "https://api.github.com/repos/monalisa/testing/branches{/branch}",
|
||||
"clone_url": "https://github.com/monalisa/testing.git",
|
||||
"collaborators_url": "https://api.github.com/repos/monalisa/testing/collaborators{/collaborator}",
|
||||
"comments_url": "https://api.github.com/repos/monalisa/testing/comments{/number}",
|
||||
"commits_url": "https://api.github.com/repos/monalisa/testing/commits{/sha}",
|
||||
"compare_url": "https://api.github.com/repos/monalisa/testing/compare/{base}...{head}",
|
||||
"contents_url": "https://api.github.com/repos/monalisa/testing/contents/{+path}",
|
||||
"contributors_url": "https://api.github.com/repos/monalisa/testing/contributors",
|
||||
"created_at": 1516230842,
|
||||
"default_branch": "main",
|
||||
"deployments_url": "https://api.github.com/repos/monalisa/testing/deployments",
|
||||
"description": null,
|
||||
"disabled": false,
|
||||
"downloads_url": "https://api.github.com/repos/monalisa/testing/downloads",
|
||||
"events_url": "https://api.github.com/repos/monalisa/testing/events",
|
||||
"fork": false,
|
||||
"forks": 1,
|
||||
"forks_count": 1,
|
||||
"forks_url": "https://api.github.com/repos/monalisa/testing/forks",
|
||||
"full_name": "monalisa/testing",
|
||||
"git_commits_url": "https://api.github.com/repos/monalisa/testing/git/commits{/sha}",
|
||||
"git_refs_url": "https://api.github.com/repos/monalisa/testing/git/refs{/sha}",
|
||||
"git_tags_url": "https://api.github.com/repos/monalisa/testing/git/tags{/sha}",
|
||||
"git_url": "git://github.com/monalisa/testing.git",
|
||||
"has_downloads": true,
|
||||
"has_issues": true,
|
||||
"has_pages": false,
|
||||
"has_projects": true,
|
||||
"has_wiki": true,
|
||||
"homepage": null,
|
||||
"hooks_url": "https://api.github.com/repos/monalisa/testing/hooks",
|
||||
"html_url": "https://github.com/monalisa/testing",
|
||||
"id": 117904191,
|
||||
"is_template": false,
|
||||
"issue_comment_url": "https://api.github.com/repos/monalisa/testing/issues/comments{/number}",
|
||||
"issue_events_url": "https://api.github.com/repos/monalisa/testing/issues/events{/number}",
|
||||
"issues_url": "https://api.github.com/repos/monalisa/testing/issues{/number}",
|
||||
"keys_url": "https://api.github.com/repos/monalisa/testing/keys{/key_id}",
|
||||
"labels_url": "https://api.github.com/repos/monalisa/testing/labels{/name}",
|
||||
"language": "Shell",
|
||||
"languages_url": "https://api.github.com/repos/monalisa/testing/languages",
|
||||
"license": null,
|
||||
"master_branch": "main",
|
||||
"merges_url": "https://api.github.com/repos/monalisa/testing/merges",
|
||||
"milestones_url": "https://api.github.com/repos/monalisa/testing/milestones{/number}",
|
||||
"mirror_url": null,
|
||||
"name": "testing",
|
||||
"node_id": "MDEwOlJlcG9zaXRvcnkxMTc5MDQxOTE=",
|
||||
"notifications_url": "https://api.github.com/repos/monalisa/testing/notifications{?since,all,participating}",
|
||||
"open_issues": 5,
|
||||
"open_issues_count": 5,
|
||||
"owner": {
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/12102068?v=4",
|
||||
"email": "monalisa@users.noreply.github.com",
|
||||
"events_url": "https://api.github.com/users/monalisa/events{/privacy}",
|
||||
"followers_url": "https://api.github.com/users/monalisa/followers",
|
||||
"following_url": "https://api.github.com/users/monalisa/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}",
|
||||
"gravatar_id": "",
|
||||
"html_url": "https://github.com/monalisa",
|
||||
"id": 12102068,
|
||||
"login": "monalisa",
|
||||
"name": "monalisa",
|
||||
"node_id": "MDQ6VXNlcjEyMTAyMDY4",
|
||||
"organizations_url": "https://api.github.com/users/monalisa/orgs",
|
||||
"received_events_url": "https://api.github.com/users/monalisa/received_events",
|
||||
"repos_url": "https://api.github.com/users/monalisa/repos",
|
||||
"site_admin": true,
|
||||
"starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/monalisa/subscriptions",
|
||||
"type": "User",
|
||||
"url": "https://api.github.com/users/monalisa"
|
||||
},
|
||||
"private": false,
|
||||
"pulls_url": "https://api.github.com/repos/monalisa/testing/pulls{/number}",
|
||||
"pushed_at": 1660066812,
|
||||
"releases_url": "https://api.github.com/repos/monalisa/testing/releases{/id}",
|
||||
"size": 611,
|
||||
"ssh_url": "git@github.com:monalisa/testing.git",
|
||||
"stargazers": 1,
|
||||
"stargazers_count": 1,
|
||||
"stargazers_url": "https://api.github.com/repos/monalisa/testing/stargazers",
|
||||
"statuses_url": "https://api.github.com/repos/monalisa/testing/statuses/{sha}",
|
||||
"subscribers_url": "https://api.github.com/repos/monalisa/testing/subscribers",
|
||||
"subscription_url": "https://api.github.com/repos/monalisa/testing/subscription",
|
||||
"svn_url": "https://github.com/monalisa/testing",
|
||||
"tags_url": "https://api.github.com/repos/monalisa/testing/tags",
|
||||
"teams_url": "https://api.github.com/repos/monalisa/testing/teams",
|
||||
"topics": [],
|
||||
"trees_url": "https://api.github.com/repos/monalisa/testing/git/trees{/sha}",
|
||||
"updated_at": "2022-01-05T02:14:32Z",
|
||||
"url": "https://github.com/monalisa/testing",
|
||||
"visibility": "public",
|
||||
"watchers": 1,
|
||||
"watchers_count": 1,
|
||||
"web_commit_signoff_required": false
|
||||
},
|
||||
"sender": {
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/12102068?v=4",
|
||||
"events_url": "https://api.github.com/users/monalisa/events{/privacy}",
|
||||
"followers_url": "https://api.github.com/users/monalisa/followers",
|
||||
"following_url": "https://api.github.com/users/monalisa/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/monalisa/gists{/gist_id}",
|
||||
"gravatar_id": "",
|
||||
"html_url": "https://github.com/monalisa",
|
||||
"id": 12102068,
|
||||
"login": "monalisa",
|
||||
"node_id": "MDQ6VXNlcjEyMTAyMDY4",
|
||||
"organizations_url": "https://api.github.com/users/monalisa/orgs",
|
||||
"received_events_url": "https://api.github.com/users/monalisa/received_events",
|
||||
"repos_url": "https://api.github.com/users/monalisa/repos",
|
||||
"site_admin": true,
|
||||
"starred_url": "https://api.github.com/users/monalisa/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/monalisa/subscriptions",
|
||||
"type": "User",
|
||||
"url": "https://api.github.com/users/monalisa"
|
||||
}
|
||||
},
|
||||
"server_url": "https://github.com",
|
||||
"api_url": "https://api.github.com",
|
||||
"graphql_url": "https://api.github.com/graphql",
|
||||
"ref_name": "main",
|
||||
"ref_protected": false,
|
||||
"ref_type": "branch",
|
||||
"secret_source": "Actions",
|
||||
"workspace": "/home/runner/work/testing/testing",
|
||||
"action": "__run_2",
|
||||
"event_path": "/home/runner/work/_temp/_github_workflow/event.json",
|
||||
"action_repository": "",
|
||||
"action_ref": "",
|
||||
"path": "/home/runner/work/_temp/_runner_file_commands/add_path_04146e5b-5a26-490d-b886-886641aa5651",
|
||||
"env": "/home/runner/work/_temp/_runner_file_commands/set_env_04146e5b-5a26-490d-b886-886641aa5651",
|
||||
"step_summary": "/home/runner/work/_temp/_runner_file_commands/step_summary_04146e5b-5a26-490d-b886-886641aa5651"
|
||||
}
|
||||
},
|
||||
"err": {
|
||||
"kind": "evaluation",
|
||||
"value": "The maximum allowed memory size was exceeded"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
{
|
||||
"basics": [
|
||||
{
|
||||
"expr": "tojson(null)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "null"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(true)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "true"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(false)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "false"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(0)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(-0)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(123456789)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "123456789"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(-123456789)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "-123456789"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(1234.5)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "1234.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(-1234.5)",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "-1234.5"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson('')",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "\"\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson('abc')",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "\"abc\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson('abc''def')",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "\"abc'def\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson('abc\\\"def')",
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "\"abc\\\\\\\"def\""
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(emptyArray)",
|
||||
"contexts": {
|
||||
"emptyArray": []
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "[]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(emptyObject)",
|
||||
"contexts": {
|
||||
"emptyObject": {}
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "{}"
|
||||
}
|
||||
}
|
||||
],
|
||||
"arrays": [
|
||||
{
|
||||
"expr": "tojson(myArray)",
|
||||
"contexts": {
|
||||
"myArray": []
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "[]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(myArray)",
|
||||
"contexts": {
|
||||
"myArray": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "[\n 1,\n 2,\n 3\n]"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(myArray)",
|
||||
"contexts": {
|
||||
"myArray": [
|
||||
[
|
||||
1,
|
||||
2,
|
||||
3
|
||||
],
|
||||
[
|
||||
"abc",
|
||||
"def",
|
||||
"ghi"
|
||||
],
|
||||
[
|
||||
true,
|
||||
false,
|
||||
null,
|
||||
[],
|
||||
{}
|
||||
]
|
||||
]
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "[\n [\n 1,\n 2,\n 3\n ],\n [\n \"abc\",\n \"def\",\n \"ghi\"\n ],\n [\n true,\n false,\n null,\n [],\n {}\n ]\n]"
|
||||
}
|
||||
}
|
||||
],
|
||||
"object": [
|
||||
{
|
||||
"expr": "tojson(myObject)",
|
||||
"contexts": {
|
||||
"myObject": {}
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "{}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(myObject)",
|
||||
"contexts": {
|
||||
"myObject": {
|
||||
"one": "value one",
|
||||
"two" : "value two",
|
||||
"three": "value three"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "{\n \"one\": \"value one\",\n \"two\": \"value two\",\n \"three\": \"value three\"\n}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"expr": "tojson(myObject)",
|
||||
"contexts": {
|
||||
"myObject": {
|
||||
"nested-one": {
|
||||
"one": 1,
|
||||
"two": 2,
|
||||
"three": 3
|
||||
},
|
||||
"nested-two": {
|
||||
"string one": "value one",
|
||||
"string two": "value two",
|
||||
"string three": "value three"
|
||||
},
|
||||
"nested-three": {
|
||||
"true": true,
|
||||
"false": false,
|
||||
"null": null,
|
||||
"array": [],
|
||||
"object": {}
|
||||
}
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"kind": "String",
|
||||
"value": "{\n \"nested-one\": {\n \"one\": 1,\n \"two\": 2,\n \"three\": 3\n },\n \"nested-two\": {\n \"string one\": \"value one\",\n \"string two\": \"value two\",\n \"string three\": \"value three\"\n },\n \"nested-three\": {\n \"true\": true,\n \"false\": false,\n \"null\": null,\n \"array\": [],\n \"object\": {}\n }\n}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user