From 623084fc09e0ceab1ab40860ae6a3d27d50a624d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Wed, 3 Jul 2024 11:47:56 +0200 Subject: [PATCH] Add test for `*path-filter*` --- src/cljnix/nix.clj | 1 + test/cljnix/nix_test.clj | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cljnix/nix.clj b/src/cljnix/nix.clj index a233990..4719575 100644 --- a/src/cljnix/nix.clj +++ b/src/cljnix/nix.clj @@ -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 diff --git a/test/cljnix/nix_test.clj b/test/cljnix/nix_test.clj index 212292c..4d24028 100644 --- a/test/cljnix/nix_test.clj +++ b/test/cljnix/nix_test.clj @@ -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) @@ -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")))))