From aed36f10bda703018a30f8971ebe2c1c3db76726 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Tue, 9 Jan 2024 12:00:53 +0100 Subject: [PATCH] max-depth --- test/babashka/fs_test.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/babashka/fs_test.clj b/test/babashka/fs_test.clj index 88f3716..eabbd30 100644 --- a/test/babashka/fs_test.clj +++ b/test/babashka/fs_test.clj @@ -123,9 +123,9 @@ (is (= 2 (count (fs/glob tmp-dir1 "foo/bar/baz/*.clj"))))))) (testing "return also directories" (let [tmp-dir1 (temp-dir) - nested-dir (fs/file tmp-dir1 "foo" "bar" "baz") + nested-dir (fs/file tmp-dir1 "foo") _ (fs/create-dirs nested-dir)] - (is (= 2 (count (map fs/directory? (fs/glob tmp-dir1 "**/{bar,baz}" {:recursive true})))))))) + (is (= 1 (count (map fs/directory? (fs/glob tmp-dir1 "*" {:max-depth 1})))))))) (deftest create-dir-test (is (fs/create-dir (fs/path (temp-dir) "foo"))))