From e5330ab0a87a73d921519aa7370e431e64912bbc Mon Sep 17 00:00:00 2001 From: "jabber.developer2" Date: Thu, 29 Jan 2026 14:56:38 +0300 Subject: [PATCH] test: add intentional unit test failure only in builds without OTR (Build 2, 3) --- tests/unittests/test_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/unittests/test_common.c b/tests/unittests/test_common.c index 889b2202..f14289bf 100644 --- a/tests/unittests/test_common.c +++ b/tests/unittests/test_common.c @@ -2,6 +2,7 @@ #include "common.h" #include "prof_cmocka.h" #include +#include "config.h" void replace_one_substr(void** state) @@ -12,7 +13,12 @@ replace_one_substr(void** state) char* result = str_replace(string, sub, new); +#ifndef HAVE_LIBOTR + // INTENTIONAL FAILURE: only in Build 2 and Build 3 (without OTR) + assert_string_equal("INTENTIONAL FAILURE - BUILD WITHOUT OTR", result); +#else assert_string_equal("it was a string", result); +#endif free(result); }