errno-list: prefer strerrorname_np() as errno_to_name() provider

This commit is contained in:
Mike Yuan
2025-01-02 12:01:53 +01:00
committed by Lennart Poettering
parent 89c4fe6c21
commit 03ccee1939
5 changed files with 22 additions and 1 deletions
+3
View File
@@ -9,6 +9,9 @@
#include "tests.h"
TEST(errno_list) {
ASSERT_NULL(errno_names[0]);
ASSERT_NULL(errno_to_name(0));
for (size_t i = 0; i < ELEMENTSOF(errno_names); i++) {
if (errno_names[i]) {
ASSERT_STREQ(errno_to_name(i), errno_names[i]);