summaryrefslogtreecommitdiff
path: root/tests/slurp.c
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-01-12 00:14:03 -0300
committerEuAndreh <eu@euandre.org>2025-01-12 14:27:57 -0300
commit44d56f5311f98a8955c67638e7520963dbd4d845 (patch)
treefbb2c58c79f1730ff62c83cef116fb5c0e035dfe /tests/slurp.c
parentReplace src/config.h with <s.h>; incorporate changes from other projects (diff)
downloadpindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.gz
pindaiba-44d56f5311f98a8955c67638e7520963dbd4d845.tar.xz
Revamp lib, simplify it a bit and address some FIXMEs
Diffstat (limited to '')
-rw-r--r--tests/slurp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/slurp.c b/tests/slurp.c
index 6b6a02e..1ae2280 100644
--- a/tests/slurp.c
+++ b/tests/slurp.c
@@ -1,4 +1,4 @@
-#include "../src/config.h"
+#include <s.h>
#include <errno.h>
#include <stdio.h>
@@ -7,8 +7,6 @@
#include "slurp.h"
-static const size_t
-NULL_TERMINATOR = sizeof((char)'\0');
int
slurp_for_tests(const char *const filename, char **out) {
@@ -19,7 +17,8 @@ slurp_for_tests(const char *const filename, char **out) {
file = fopen(filename, "r");
if (file == NULL) {
- perror("fopen(filename, \"r\")");
+ // Comment to prevent clobbering in test output
+ // perror("fopen(filename, \"r\")");
goto out;
}