minecraft-pi-reborn/mods/src/test/test.c
2021-06-17 17:32:24 -04:00

24 lines
510 B
C

#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <libreborn/libreborn.h>
#include "../home/home.h"
#include "../init/init.h"
void run_tests() {
// Test ~/.minecraft-pi Permissions
{
char *path = home_get();
int exists = access(path, F_OK) == 0;
int can_write = exists ? access(path, R_OK | W_OK) == 0 : 1;
free(path);
if (!can_write) {
// Failure
ERR("%s", "Invalid Data Directory Permissions");
}
}
}