Skip to content

Commit 1d11e21

Browse files
Update test_soap.c
1 parent 206fd57 commit 1d11e21

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

code/tests/cases/test_soap.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,14 @@ FOSSIL_TEST(c_test_io_soap_detect_fallacy) {
287287

288288
FOSSIL_TEST(c_test_io_soap_summarize) {
289289
const char *input = "Although the product has some flaws, it is still worth buying because of its affordability.";
290-
const char *expected = "It's affordable despite some flaws."; // approximate
290+
const char *expected = "affordable despite some flaws"; // approximate key meaning
291+
291292
char *result = fossil_io_soap_summarize(input);
292-
ASSUME_ITS_TRUE(result != NULL); // Exact match may vary
293+
ASSUME_ITS_TRUE(result != NULL);
294+
295+
// Check if expected meaning is included in the result
296+
ASSUME_ITS_TRUE(strstr(result, expected) != NULL);
297+
293298
free(result);
294299
}
295300

0 commit comments

Comments
 (0)