diff options
| author | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-02-12 09:41:31 -0500 |
|---|---|---|
| committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2026-02-12 09:41:31 -0500 |
| commit | 835903affdbe8b807fabfa8b991cd02ff4ba547d (patch) | |
| tree | 9a1391f322e6b0df5fceddac3df55df6d73c1a2f | |
| parent | b192fdbf220acc88cb4b9ebb859537048f2fcf9b (diff) | |
| download | stasis-835903affdbe8b807fabfa8b991cd02ff4ba547d.tar.gz | |
Test against the tc struct's expected value
| -rw-r--r-- | tests/test_strlist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_strlist.c b/tests/test_strlist.c index ce38ff6..47722c0 100644 --- a/tests/test_strlist.c +++ b/tests/test_strlist.c @@ -115,6 +115,7 @@ void test_strlist_append_file() { const char *local_filename = "test_strlist_append_file.txt"; struct testcase tc[] = { + {.origin = "https://this-will-never-work.tld/remote.txt", .expected = (const char *[]){NULL}}, {.origin = "https://ssb.stsci.edu/jhunk/stasis_test/test_strlist_append_file_from_remote.txt", .expected = expected}, {.origin = local_filename, .expected = expected}, }; @@ -141,10 +142,10 @@ void test_strlist_append_file() { const char *left; const char *right; left = strlist_item(list, z); - right = expected[z]; + right = tc[i].expected[z]; STASIS_ASSERT(strcmp(left, right) == 0, "file content is different than expected"); } - STASIS_ASSERT(strcmp_array((const char **) list->data, expected) == 0, "file contents does not match expected values"); + STASIS_ASSERT(strcmp_array((const char **) list->data, tc[i].expected) == 0, "file contents does not match expected values"); guard_strlist_free(&list); } } |
