X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fencrypted.c;h=ac0dfa92023afdb77a47a49170444b76fc3eeb69;hb=0f0bea383106de1a896905fdf8a56f55265bce74;hp=a97e0eec1e1f63604808e553ab268a667db036a5;hpb=f1da50294494310d7a299c29af5649d4415bd38a;p=meshlink diff --git a/test/encrypted.c b/test/encrypted.c index a97e0eec..ac0dfa92 100644 --- a/test/encrypted.c +++ b/test/encrypted.c @@ -8,11 +8,12 @@ #include #include #include +#include #include "meshlink.h" #include "utils.h" -int main() { +int main(void) { meshlink_set_log_cb(NULL, MESHLINK_DEBUG, log_cb); // Open a new meshlink instance. @@ -40,5 +41,15 @@ int main() { // Destroy the mesh. assert(meshlink_destroy("encrypted_conf")); - assert(access("encrypted_conf", F_OK) == -1 && errno == ENOENT); + + DIR *dir = opendir("encrypted_conf"); + assert(dir); + struct dirent *ent; + + while((ent = readdir(dir))) { + fprintf(stderr, "%s\n", ent->d_name); + assert(!strcmp(ent->d_name, ".") || !strcmp(ent->d_name, "..")); + } + + closedir(dir); }