Skip to content

Commit 34a4d5d

Browse files
committed
feat: added tests
1 parent 1ad0d10 commit 34a4d5d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/ojo_tests.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ open Ojo_lib
22

33
let () =
44
Test_rainbow.print_all_colors ();
5+
Test_watcher.test_tree ();
56
Test_utils.test_vec ();
67

78
Rainbow.print Green "\n[Test] - All tests passed"

test/test_watcher.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
open Ojo_lib
2+
open Ojo_lib.Utils
3+
4+
let test_tree () =
5+
let dir = Watcher.Dir.make ~max_depth:1 "/home/aq" in
6+
dir.files
7+
|> Vector.iter (fun e -> Printf.printf " %s\n" (Watcher.File.get_path e))
8+
(* Watcher.tree "/home/aq" |> Array.iter (Printf.printf "\t%s\n") *)

0 commit comments

Comments
 (0)