Skip to content

Commit

Permalink
Add test for *path-filter*
Browse files Browse the repository at this point in the history
  • Loading branch information
jlesquembre committed Jul 3, 2024
1 parent d0e98fa commit 623084f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/cljnix/nix.clj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

(def narVersionMagic1 "nix-archive-1")

; TODO probably, a better solution would be to use the .gitignore file (if present)
(def ^:dynamic
*path-filter*
"Takes 1 argument, the path name. If true, the element will not be included in
Expand Down
7 changes: 5 additions & 2 deletions test/cljnix/nix_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

(def all-deps '{:deps {org.clojure/clojure {:mvn/version "1.11.1"}
io.github.babashka/fs {:git/sha "7adcefeb773bd786408cdc788582f145f79626a6"}
io.github.weavejester/medley {:git/sha "0044c6aacc0b23eafa3b58091f49c794f5a1f5aa"}}})
io.github.weavejester/medley {:git/sha "0044c6aacc0b23eafa3b58091f49c794f5a1f5aa"}
io.github.teknql/systemic {:git/sha "2c0be3a90884f998a61f2a8174cff3c5a15a30bf"}}})

(defn deps-cache-fixture [f]
(h/prep-deps all-deps)
Expand All @@ -24,5 +25,7 @@
(nix/nix-hash (fs/expand-home "~/.gitlibs/libs/io.github.babashka/fs/7adcefeb773bd786408cdc788582f145f79626a6"))))

(is (= "sha256-drh0opl3JjrpGadg74wIdOcDTaP2GT31X3O1PGXkvqk="
(nix/nix-hash (fs/expand-home "~/.gitlibs/libs/io.github.weavejester/medley/0044c6aacc0b23eafa3b58091f49c794f5a1f5aa")))))
(nix/nix-hash (fs/expand-home "~/.gitlibs/libs/io.github.weavejester/medley/0044c6aacc0b23eafa3b58091f49c794f5a1f5aa"))))

(is (= "sha256-pxbxFZirXL9CD37rhXUw/MMdxMZbLkVqfZIQXSpDqaI="
(nix/nix-hash (fs/expand-home "~/.gitlibs/libs/io.github.teknql/systemic/2c0be3a90884f998a61f2a8174cff3c5a15a30bf")))))

0 comments on commit 623084f

Please sign in to comment.