From a9c9fc392bf2c3803251e5f63c944cd221a1ca67 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 12 Jan 2024 12:01:07 -0500 Subject: tests: Merge unit test executables into one --- tests/bfstd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/bfstd.c') diff --git a/tests/bfstd.c b/tests/bfstd.c index c386279..d385c6b 100644 --- a/tests/bfstd.c +++ b/tests/bfstd.c @@ -1,6 +1,7 @@ // Copyright © Tavian Barnes // SPDX-License-Identifier: 0BSD +#include "tests.h" #include "../src/bfstd.h" #include "../src/config.h" #include "../src/diag.h" @@ -34,7 +35,7 @@ static void check_wordesc(const char *str, const char *exp, enum wesc_flags flag bfs_verify(strcmp(buf, exp) == 0, "wordesc(%s) == %s (!= %s)", str, buf, exp); } -int main(void) { +bool check_bfstd(void) { // Try to set a UTF-8 locale if (!setlocale(LC_ALL, "C.UTF-8")) { setlocale(LC_ALL, ""); @@ -69,5 +70,5 @@ int main(void) { check_wordesc("\xF0\x9F\x98\x80", "\xF0\x9F\x98\x80", WESC_SHELL | WESC_TTY); } - return EXIT_SUCCESS; + return true; } -- cgit v1.2.3