diff options
| author | Mikael Voss <mvs@nyantec.com> | 2025-03-13 12:57:06 +0100 |
|---|---|---|
| committer | Mikael Voss <mvs@nyantec.com> | 2025-04-02 13:26:43 +0200 |
| commit | bf790d1a7fffcfd5c6a92711179d644119128a61 (patch) | |
| tree | 18969afd6d67392a3dd18a0bc57bd9a97cb55dc7 /lib/path/tests | |
| parent | polkadot: 2412-3 -> 2412-4 (#395145) (diff) | |
| download | nixpkgs-bf790d1a7fffcfd5c6a92711179d644119128a61.tar.gz | |
lib/path: properly handle /. in hasStorePathPrefix
Diffstat (limited to 'lib/path/tests')
| -rw-r--r-- | lib/path/tests/unit.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/path/tests/unit.nix b/lib/path/tests/unit.nix index a52b4f44e51d..fa2e004e9c3a 100644 --- a/lib/path/tests/unit.nix +++ b/lib/path/tests/unit.nix @@ -110,6 +110,12 @@ let expected = false; }; + # Root path (empty path components list) + testHasStorePathPrefixRoot = { + expr = hasStorePathPrefix /.; + expected = false; + }; + testHasStorePathPrefixExample1 = { expr = hasStorePathPrefix (storeDirPath + "/nvl9ic0pj1fpyln3zaqrf4cclbqdfn1j-foo/bar/baz"); expected = true; |
