From 25769288f62816d733004c9e8347c35dd0e4ce2a Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 27 Mar 2024 11:20:20 -0400 Subject: tests: New bfs_pcheck() macro to report xstrerror(errno) --- tests/main.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/main.c') diff --git a/tests/main.c b/tests/main.c index 8849e8c..7dec320 100644 --- a/tests/main.c +++ b/tests/main.c @@ -6,8 +6,10 @@ */ #include "tests.h" +#include "../src/bfstd.h" #include "../src/color.h" #include "../src/config.h" +#include #include #include #include @@ -88,6 +90,10 @@ static void run_test(struct test_ctx *ctx, const char *test, test_fn *fn) { } } +const char *bfs_errstr(void) { + return xstrerror(errno); +} + int main(int argc, char *argv[]) { // Try to set a UTF-8 locale if (!setlocale(LC_ALL, "C.UTF-8")) { -- cgit v1.2.3