Files
RedBear-OS/tests/unistd/getcwd.c
T
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

25 lines
420 B
C

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "test_helpers.h"
int main(void) {
char first[PATH_MAX] = { 0 };
getcwd(first, PATH_MAX);
puts(first);
char* second = getcwd(NULL, 0);
puts(second);
if (strcmp(first, second)) {
puts("Not matching");
free(second);
exit(EXIT_FAILURE);
}
free(second);
}