rosavox/lib/alveolata/sql/test.spec.json
2025-05-23 07:33:29 +00:00

103 lines
1.6 KiB
JSON

{
"active": true,
"sections": [
{
"name": "format",
"active": true,
"execution": {
"call": "\\alveolata\\sql\\format({{value}})"
},
"cases": [
{
"name": "null",
"active": true,
"input": {
"value": null
},
"output": {
"kind": "regular",
"value": "NULL"
}
},
{
"name": "int",
"active": true,
"input": {
"value": 42
},
"output": {
"kind": "regular",
"value": "42"
}
},
{
"name": "float",
"active": true,
"input": {
"value": 2.718218
},
"output": {
"kind": "regular",
"value": "2.7182"
}
},
{
"name": "string_without_quotes",
"active": true,
"input": {
"value": "foo"
},
"output": {
"kind": "regular",
"value": "'foo'"
}
},
{
"name": "string_with_quotes",
"active": true,
"input": {
"value": "f'o"
},
"output": {
"kind": "regular",
"value": "'f''o'"
}
},
{
"name": "string_with_semicolon",
"active": true,
"input": {
"value": "f;o"
},
"output": {
"kind": "regular",
"value": "'f\\;o'"
}
},
{
"name": "array_empty",
"active": true,
"input": {
"value": []
},
"output": {
"kind": "regular",
"value": "('___DUMMY_VALUE___')"
}
},
{
"name": "array_nonempty",
"active": true,
"input": {
"value": [2,3,5]
},
"output": {
"kind": "regular",
"value": "(2,3,5)"
}
}
]
}
]
}