2024-06-01 16:19:27 +00:00
|
|
|
GET http://localhost:8080/
|
|
|
|
HTTP 200
|
|
|
|
[Asserts]
|
|
|
|
header "Content-Type" contains "text/html"
|
|
|
|
|
|
|
|
|
|
|
|
POST http://localhost:8080/v1/exec
|
|
|
|
content-type: application/json
|
|
|
|
```
|
|
|
|
{
|
2024-06-03 19:05:13 +00:00
|
|
|
"code": "use fmt;\nexport fn main() void = {\nfmt::println(\"hello world\")!;\n};\n"
|
2024-06-01 16:19:27 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
HTTP 200
|
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.ok" == true
|
|
|
|
jsonpath "$.stdout" == "hello world\n"
|
|
|
|
jsonpath "$.stderr" == ""
|
|
|
|
|
|
|
|
|
|
|
|
POST http://localhost:8080/v1/exec
|
|
|
|
content-type: application/json
|
|
|
|
```
|
|
|
|
{
|
2024-06-03 19:05:13 +00:00
|
|
|
"code": "use fmt;\nexport fn main()\n"
|
2024-06-01 16:19:27 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
HTTP 200
|
|
|
|
[Asserts]
|
|
|
|
jsonpath "$.ok" == true
|
|
|
|
jsonpath "$.stdout" == ""
|
|
|
|
jsonpath "$.stderr" matches "syntax error"
|