Skip to content

Commit ca7442b

Browse files
committed
test(mcp): avoid truncating freshness path fixture
Signed-off-by: Leonardo trindade miranda <tmonestudio@gmail.com>
1 parent 9e9fb2f commit ca7442b

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎tests/test_mcp.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3454,9 +3454,11 @@ TEST(tool_index_status_freshness_sample_cap_truncates) {
34543454
ASSERT_NOT_NULL(strstr(inner, "\"untracked_source\":"));
34553455
ASSERT_NOT_NULL(strstr(inner, "\"count\":17"));
34563456
ASSERT_NOT_NULL(strstr(inner, "\"truncated\":true"));
3457-
char sample_buf[128];
3458-
snprintf(sample_buf, sizeof(sample_buf), "\"paths\":[\"u00.txt\",\"u01.txt\",\"u02.txt\",\"u03.txt\",\"u04.txt\",\"u05.txt\",\"u06.txt\",\"u07.txt\",\"u08.txt\",\"u09.txt\",\"u10.txt\",\"u11.txt\",\"u12.txt\",\"u13.txt\",\"u14.txt\",\"u15.txt\"]");
3459-
ASSERT_NOT_NULL(strstr(inner, sample_buf));
3457+
static const char EXPECTED_PATHS[] =
3458+
"\"paths\":[\"u00.txt\",\"u01.txt\",\"u02.txt\",\"u03.txt\",\"u04.txt\",\"u05.txt\","
3459+
"\"u06.txt\",\"u07.txt\",\"u08.txt\",\"u09.txt\",\"u10.txt\",\"u11.txt\",\"u12.txt\","
3460+
"\"u13.txt\",\"u14.txt\",\"u15.txt\"]";
3461+
ASSERT_NOT_NULL(strstr(inner, EXPECTED_PATHS));
34603462

34613463
free(inner);
34623464
free(resp);

0 commit comments

Comments
 (0)