X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=test%2Fencrypted.c;h=c7d5bc4b7fb310c7f640ee40f2f6e64f309a9717;hb=f342cb44b25cd61eed17897575015be4aae1dd17;hp=17b2fd80a7fc81f1a11ffdd30672758f97b2929a;hpb=9a2520c36431a8a5fd90451e97f488c22f4decc5;p=meshlink diff --git a/test/encrypted.c b/test/encrypted.c index 17b2fd80..c7d5bc4b 100644 --- a/test/encrypted.c +++ b/test/encrypted.c @@ -1,9 +1,14 @@ +#ifdef NDEBUG +#undef NDEBUG +#endif + #include #include #include #include #include #include +#include #include "meshlink.h" #include "utils.h" @@ -36,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); }