diff options
| author | Donald Sharp <donaldsharp72@gmail.com> | 2025-03-14 10:33:16 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-14 10:33:16 -0400 |
| commit | dbecefb6c6eac3ad9d798e66ae2a8c572590c0bd (patch) | |
| tree | bb9e0e202ba7921fde81e5e775e51187a925769a /tests/lib/test_darr.c | |
| parent | e5848deedf01f77194b3cff457dc462230c257da (diff) | |
| parent | 2586c4c3edeab982d65071e5d90329ba47189af4 (diff) | |
Merge pull request #18383 from LabNConsulting/chopps/fix-oper-state-list-query-bug
Fix bug with oper-state queries including list node
Diffstat (limited to 'tests/lib/test_darr.c')
| -rw-r--r-- | tests/lib/test_darr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/lib/test_darr.c b/tests/lib/test_darr.c index 87f9e3e564..be319db1c1 100644 --- a/tests/lib/test_darr.c +++ b/tests/lib/test_darr.c @@ -48,6 +48,7 @@ * [x] - darr_strdup * [x] - darr_strdup_cap * [x] - darr_strlen + * [x] - darr_strlen_fixup * [x] - darr_strnul * [ ] - darr_vsprintf */ @@ -406,6 +407,9 @@ static void test_string(void) assert(!strcmp(da1, "0123456789: DEADBEEF")); assert(darr_strlen(da1) == 20); assert(darr_cap(da1) == 128); + + da1[5] = 0; + assert(darr_strlen_fixup(da1) == 5); darr_free(da1); da1 = darr_sprintf("0123456789: %08x", 0xDEADBEEF); |
