1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

store: Add `store-path-hash-part'.

* guix/store.scm (store-path-hash-part): New procedure.
* tests/store.scm ("store-path-hash-part", "store-path-hash-part #f"):
  New tests.
This commit is contained in:
Ludovic Courtès
2013-04-01 16:08:31 +02:00
parent ef8c03407d
commit 2c6ab6ccd4
2 changed files with 23 additions and 1 deletions

View File

@@ -48,6 +48,18 @@
(test-begin "store")
(test-equal "store-path-hash-part"
"283gqy39v3g9dxjy26rynl0zls82fmcg"
(store-path-hash-part
(string-append (%store-prefix)
"/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
(test-equal "store-path-hash-part #f"
#f
(store-path-hash-part
(string-append (%store-prefix)
"/foo/bar/283gqy39v3g9dxjy26rynl0zls82fmcg-guile-2.0.7")))
(test-skip (if %store 0 10))
(test-assert "dead-paths"