Optimise the read proc

This commit is contained in:
Hugo Mårdbrink 2025-11-09 11:45:31 +01:00
parent 4316fb2a73
commit 83b39b15f6
2 changed files with 10 additions and 10 deletions

View file

@ -174,7 +174,7 @@ shutdown_concurrent_server :: proc(
thread.destroy(t)
}
assert_endpoint :: proc(url: string, expected_response: string) {
assert_endpoint_response :: proc(url: string, expected_response: string) {
state, stdout, stderr, err := os2.process_exec(
{command = []string{"curl", "-s", url}},
context.temp_allocator,
@ -232,15 +232,15 @@ test_server_general_ok :: proc(t: ^testing.T) {
t := start_concurrent_server(&server)
assert_endpoint(
assert_endpoint_response(
"http://127.0.0.1:8080/hello/world",
"<div>Hello firstworld</div>",
)
assert_endpoint(
assert_endpoint_response(
"http://127.0.0.1:8080/hello/lonely%20world/only",
"<div>Hello secondlonely%20world</div>",
)
assert_endpoint(
assert_endpoint_response(
"http://127.0.0.1:8080/hello/world/and/worlds%20friend",
"<div>Hello thirdworldandworlds%20friend</div>",
)