Fixes: 423fd652b563 (2025-06-03; "lib/string/sprintf/, tests/unit/: Transform x[v]asprintf() into x[v]aprintf()")
Closes: <https://github.com/shadow-maint/shadow/issues/1279>
Reported-by: Timo Gurr <timo.gurr@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
test_xaprintf_SOURCES = \
../../lib/string/sprintf/aprintf.c \
../../lib/string/sprintf/xaprintf.c \
test_xaprintf_SOURCES = \
../../lib/string/sprintf/aprintf.c \
../../lib/string/sprintf/xaprintf.c \
+ ../../lib/string/strcmp/streq.c \
test_xaprintf.c \
$(NULL)
test_xaprintf_CFLAGS = \
test_xaprintf.c \
$(NULL)
test_xaprintf_CFLAGS = \
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-License-Identifier: BSD-3-Clause
+#include "string/sprintf/xaprintf.h"
+
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h> // Required by <cmocka.h>
#include <cmocka.h>
#include <stdint.h> // Required by <cmocka.h>
#include <cmocka.h>
-#include "string/sprintf/xaprintf.h"
+#include "string/strcmp/streq.h"
#define smock() _Generic(mock(), uintmax_t: (intmax_t) mock())
#define smock() _Generic(mock(), uintmax_t: (intmax_t) mock())
assert_unreachable();
break;
case EXIT_CALLED:
assert_unreachable();
break;
case EXIT_CALLED:
- assert_true(strcmp(p, "xaprintf_called"));
+ assert_true(streq(p, "xaprintf_called"));
p = "test_ok";
break;
default:
p = "test_ok";
break;
default:
- assert_true(strcmp(p, "test_ok"));
+ assert_true(streq(p, "test_ok"));