Files
RedBear-OS/tests/unistd/getcwd.c
T
2018-08-04 08:42:47 +02:00

23 lines
371 B
C

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