diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2026-10-09 07:56:25 +0200 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2026-10-09 07:56:25 +0200 |
| commit | 0dacf7988513117da9b0935e658f9eca3ead09f7 (patch) | |
| tree | 95b2b7a35bd73dfe62755986749a872c253cd663 /test_lib | |
| parent | a436773a9f69182b799d88f75eb3cbe14d5d37a1 (diff) | |
| download | librm-main.tar.gz librm-main.zip | |
Diffstat (limited to 'test_lib')
| -rw-r--r-- | test_lib/transport.c | 8 | ||||
| -rw-r--r-- | test_lib/transport_test.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test_lib/transport.c b/test_lib/transport.c index 004bace..08153df 100644 --- a/test_lib/transport.c +++ b/test_lib/transport.c @@ -3,7 +3,7 @@ struct ExpectedRequest *nextResult = NULL; -enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token, char *reqBody, struct SizedBlock *retBody) { +enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token, char *filename, char *reqBody, struct SizedBlock *retBody) { assert(nextResult != NULL); assert(strcmp(nextResult->url, url) == 0); if(nextResult->reqBody == NULL) { @@ -20,6 +20,12 @@ enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token assert(strcmp(nextResult->token, token) == 0); } + if(nextResult->filename == NULL) { + assert(nextResult->filename == NULL); + } else { + assert(filename != NULL); + assert(strcmp(nextResult->filename, filename) == 0); + } memcpy(retBody, &nextResult->retBody, sizeof(struct SizedBlock)); diff --git a/test_lib/transport_test.h b/test_lib/transport_test.h index ed6783b..0aa0c5c 100644 --- a/test_lib/transport_test.h +++ b/test_lib/transport_test.h @@ -5,7 +5,9 @@ struct ExpectedRequest { bool ignore; char *url; + enum HttpMethod method; char *token; + char *filename; char *reqBody; struct SizedBlock retBody; |
