about summary refs log tree commit diff
path: root/nix/utils/tests/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nix/utils/tests/default.nix')
-rw-r--r--nix/utils/tests/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nix/utils/tests/default.nix b/nix/utils/tests/default.nix
index 344a1771d7d9..d5159a8433b4 100644
--- a/nix/utils/tests/default.nix
+++ b/nix/utils/tests/default.nix
@@ -15,6 +15,7 @@ let
     isSymlink
     pathType
     storePathName
+    onlyDrvPath
     ;
 
   assertUtilsPred = msg: act: exp: [
@@ -91,9 +92,19 @@ let
       (storePathName cleanedSource)
       cleanedSource.name)
   ];
+
+  onlyDrvPathTests = it "correctly updates the string context of drvPath" [
+    (assertEq "onlyDrvPath only produces path dependencies"
+      (builtins.all
+        (dep: dep.path or false)
+        (builtins.attrValues
+          (builtins.getContext (onlyDrvPath depot.tools.cheddar))))
+      true)
+  ];
 in
 
 runTestsuite "nix.utils" [
   pathPredicates
   storePathNameTests
+  onlyDrvPathTests
 ]