test: add intentional unit test failure only in builds without OTR (Build 2, 3)
Some checks failed
CI Code / Check coding style (pull_request) Successful in 29s
CI Code / Check spelling (pull_request) Successful in 20s
CI Code / Linux (debian) (pull_request) Failing after 6m36s
CI Code / Linux (ubuntu) (pull_request) Failing after 6m33s
CI Code / Linux (arch) (pull_request) Failing after 11m49s
CI Code / Code Coverage (pull_request) Successful in 15m34s

This commit is contained in:
2026-01-29 14:56:38 +03:00
parent 6c5c523a1a
commit e5330ab0a8

View File

@@ -2,6 +2,7 @@
#include "common.h"
#include "prof_cmocka.h"
#include <stdlib.h>
#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);
}