summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-01-29 12:52:25 +0100
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-01-29 12:52:25 +0100
commit4f02e2b7a4853785a6e2ead60ed7ec848e07bb90 (patch)
tree37639e8dae2540c6a8d11faf6b39b61fd73bc7d4 /tests
parenttest(tests): Init (diff)
downloadnix-library-4f02e2b7a4853785a6e2ead60ed7ec848e07bb90.zip
test(tests): Also include a test for `useShards = true`
Diffstat (limited to 'tests')
-rw-r--r--tests/no_shards/by-name/a/file.nix (renamed from tests/by-name/a/file.nix)0
-rw-r--r--tests/no_shards/by-name/a/other.nix (renamed from tests/by-name/a/other.nix)0
-rw-r--r--tests/no_shards/by-name/b/file.nix (renamed from tests/by-name/b/file.nix)0
-rw-r--r--tests/no_shards/by-name/b/nothing.lix (renamed from tests/by-name/b/nothing.lix)0
-rw-r--r--tests/no_shards/by-name/c/file.nix (renamed from tests/by-name/c/file.nix)0
-rw-r--r--tests/no_shards/by-name/empty/file.other (renamed from tests/by-name/empty/file.other)0
-rw-r--r--tests/no_shards/by-name/tripwire.test (renamed from tests/by-name/tripwire.test)0
-rw-r--r--tests/no_shards/test.nix (renamed from tests/test.nix)2
-rw-r--r--tests/shards/by-name/em/empty/file.other0
-rw-r--r--tests/shards/by-name/fi/first/file.nix0
-rw-r--r--tests/shards/by-name/fi/first/other.nix0
-rw-r--r--tests/shards/by-name/se/second/file.nix0
-rw-r--r--tests/shards/by-name/se/second/nothing.lix0
-rw-r--r--tests/shards/by-name/th/third/file.nix0
-rw-r--r--tests/shards/by-name/tripwire.test0
-rw-r--r--tests/shards/test.nix9
16 files changed, 10 insertions, 1 deletions
diff --git a/tests/by-name/a/file.nix b/tests/no_shards/by-name/a/file.nix
index e69de29..e69de29 100644
--- a/tests/by-name/a/file.nix
+++ b/tests/no_shards/by-name/a/file.nix
diff --git a/tests/by-name/a/other.nix b/tests/no_shards/by-name/a/other.nix
index e69de29..e69de29 100644
--- a/tests/by-name/a/other.nix
+++ b/tests/no_shards/by-name/a/other.nix
diff --git a/tests/by-name/b/file.nix b/tests/no_shards/by-name/b/file.nix
index e69de29..e69de29 100644
--- a/tests/by-name/b/file.nix
+++ b/tests/no_shards/by-name/b/file.nix
diff --git a/tests/by-name/b/nothing.lix b/tests/no_shards/by-name/b/nothing.lix
index e69de29..e69de29 100644
--- a/tests/by-name/b/nothing.lix
+++ b/tests/no_shards/by-name/b/nothing.lix
diff --git a/tests/by-name/c/file.nix b/tests/no_shards/by-name/c/file.nix
index e69de29..e69de29 100644
--- a/tests/by-name/c/file.nix
+++ b/tests/no_shards/by-name/c/file.nix
diff --git a/tests/by-name/empty/file.other b/tests/no_shards/by-name/empty/file.other
index e69de29..e69de29 100644
--- a/tests/by-name/empty/file.other
+++ b/tests/no_shards/by-name/empty/file.other
diff --git a/tests/by-name/tripwire.test b/tests/no_shards/by-name/tripwire.test
index e69de29..e69de29 100644
--- a/tests/by-name/tripwire.test
+++ b/tests/no_shards/by-name/tripwire.test
diff --git a/tests/test.nix b/tests/no_shards/test.nix
index 5ae7da8..9bc25b5 100644
--- a/tests/test.nix
+++ b/tests/no_shards/test.nix
@@ -1,5 +1,5 @@
 let
-  nixLib = import ../default.nix {};
+  nixLib = import ../../default.nix {};
 in
   nixLib.mkByName {
     useShards = false;
diff --git a/tests/shards/by-name/em/empty/file.other b/tests/shards/by-name/em/empty/file.other
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/em/empty/file.other
diff --git a/tests/shards/by-name/fi/first/file.nix b/tests/shards/by-name/fi/first/file.nix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/fi/first/file.nix
diff --git a/tests/shards/by-name/fi/first/other.nix b/tests/shards/by-name/fi/first/other.nix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/fi/first/other.nix
diff --git a/tests/shards/by-name/se/second/file.nix b/tests/shards/by-name/se/second/file.nix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/se/second/file.nix
diff --git a/tests/shards/by-name/se/second/nothing.lix b/tests/shards/by-name/se/second/nothing.lix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/se/second/nothing.lix
diff --git a/tests/shards/by-name/th/third/file.nix b/tests/shards/by-name/th/third/file.nix
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/th/third/file.nix
diff --git a/tests/shards/by-name/tripwire.test b/tests/shards/by-name/tripwire.test
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/shards/by-name/tripwire.test
diff --git a/tests/shards/test.nix b/tests/shards/test.nix
new file mode 100644
index 0000000..6057b82
--- /dev/null
+++ b/tests/shards/test.nix
@@ -0,0 +1,9 @@
+let
+  nixLib = import ../../default.nix {};
+in
+  nixLib.mkByName {
+    useShards = true;
+    baseDirectory = ./by-name;
+    fileName = "file.nix";
+    # fileRegex = ".*\.nix";
+  }