test(ai): align parse_response tests with chat completions API
Some checks failed
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Check coding style (pull_request) Failing after 31s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m40s
CI Code / Linux (debian) (pull_request) Successful in 7m54s
CI Code / Code Coverage (pull_request) Successful in 8m38s
CI Code / Linux (arch) (pull_request) Successful in 11m0s
Some checks failed
CI Code / Check spelling (pull_request) Successful in 17s
CI Code / Check coding style (pull_request) Failing after 31s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m40s
CI Code / Linux (debian) (pull_request) Successful in 7m54s
CI Code / Code Coverage (pull_request) Successful in 8m38s
CI Code / Linux (arch) (pull_request) Successful in 11m0s
The chat-completions refactor removed the legacy Perplexity "text" extraction but left two tests asserting the old behavior, breaking make check on every CI flavor: - test_ai_parse_response_perplexity_text expected the legacy /v1/agent nested format to parse; it now yields NULL — renamed to test_ai_parse_response_legacy_text_format_unsupported. - test_ai_parse_response_text_preferred_over_content expected "text" to win; "content" is authoritative now — renamed to test_ai_parse_response_content_preferred_over_text. Add test_ai_set_provider_setting_reserved_key covering the new reserved-key rejection.
This commit is contained in:
@@ -43,6 +43,7 @@ void test_ai_providers_find_case_insensitive(void** state);
|
||||
void test_ai_set_provider_default_model(void** state);
|
||||
void test_ai_get_provider_default_model(void** state);
|
||||
void test_ai_set_provider_setting(void** state);
|
||||
void test_ai_set_provider_setting_reserved_key(void** state);
|
||||
void test_ai_get_provider_setting(void** state);
|
||||
/* Model caching tests */
|
||||
void test_ai_models_are_fresh_initial(void** state);
|
||||
@@ -64,8 +65,8 @@ int ai_client_teardown_with_prefs(void** state);
|
||||
|
||||
/* Chat response parser tests (ai_parse_response) */
|
||||
void test_ai_parse_response_openai_content(void** state);
|
||||
void test_ai_parse_response_perplexity_text(void** state);
|
||||
void test_ai_parse_response_text_preferred_over_content(void** state);
|
||||
void test_ai_parse_response_legacy_text_format_unsupported(void** state);
|
||||
void test_ai_parse_response_content_preferred_over_text(void** state);
|
||||
void test_ai_parse_response_escaped_quote(void** state);
|
||||
void test_ai_parse_response_newline_escape(void** state);
|
||||
void test_ai_parse_response_empty_content(void** state);
|
||||
|
||||
Reference in New Issue
Block a user