Files
Red Bear OS 1b3e94a20d Red Bear OS relibc baseline
From release 0.1.0 pre-patched archive.
This includes all Red Bear modifications previously maintained
as patches in local/patches/relibc/.
2026-06-27 09:19:26 +03:00

20 lines
371 B
C

#include <stdio.h>
#include <errno.h>
#include "test_helpers.h"
int main(void) {
FILE *f = fopen("stdio/fputs.out", "w");
ERROR_IF(fopen, f, == NULL);
char *in = "Hello World!";
int p = fputs(in, f);
ERROR_IF(fputs, p, == EOF);
UNEXP_IF(fputs, p, < 0);
int c = fclose(f);
ERROR_IF(fclose, c, == EOF);
UNEXP_IF(fclose, c, != 0);
}