aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test.c b/test/test.c
index edb1c99..b5d0900 100644
--- a/test/test.c
+++ b/test/test.c
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
+#include <dirent.h>
+#include <string.h>
#include <unistd.h>
#include <assert.h>
@@ -44,6 +46,14 @@ int main() {
assert(system("ls ../fs/mnt/tabs/last-focused/debugger/scripts") == 0);
+ {
+ DIR* scripts = opendir("../fs/mnt/tabs/last-focused/debugger/scripts");
+ assert(strcmp(readdir(scripts)->d_name, ".") == 0);
+ assert(strcmp(readdir(scripts)->d_name, "..") == 0);
+ assert(strcmp(readdir(scripts)->d_name, "7_file____Users_osnr_Code_tabfs_test_test-script.js") == 0);
+ closedir(scripts);
+ }
+
assert(system("echo remove > ../fs/mnt/tabs/last-focused/control") == 0);
}