mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
store: Add `store-path-package-name'.
* guix/store.scm (store-path-package-name): New procedure. * tests/utils.scm ("store-path-package-name"): New test.
This commit is contained in:
parent
07d18f39cc
commit
e3d741065e
2 changed files with 19 additions and 1 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
(define-module (test-utils)
|
||||
#:use-module (guix utils)
|
||||
#:use-module ((guix store) #:select (store-path-package-name))
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-11)
|
||||
#:use-module (srfi srfi-26)
|
||||
|
@ -162,6 +163,12 @@
|
|||
(match b (($ <foo> 1 2) #t))
|
||||
(equal? b c)))))
|
||||
|
||||
;; This is actually in (guix store).
|
||||
(test-equal "store-path-package-name"
|
||||
"bash-4.2-p24"
|
||||
(store-path-package-name
|
||||
"/nix/store/qvs2rj2ia5vci3wsdb7qvydrmacig4pg-bash-4.2-p24"))
|
||||
|
||||
(test-end)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue