mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-23 21:17:11 -05:00
tests: Exercise 'modify-inputs' with a 'replace' clause.
* tests/packages.scm ("modify-inputs, replace") ("modify-inputs, replace, change output"): New tests.
This commit is contained in:
parent
66a4a5ecb2
commit
e3801126a9
1 changed files with 26 additions and 0 deletions
|
@ -1956,6 +1956,32 @@ (define (list->set* lst)
|
|||
(dummy-package "a"
|
||||
(arguments (this-package-native-input "hello")))))
|
||||
|
||||
(test-eq "modify-inputs, replace"
|
||||
coreutils
|
||||
;; Replace an input; notice that the label in unchanged.
|
||||
(let* ((p1 (dummy-package "p"
|
||||
(inputs (list hello))))
|
||||
(p2 (package
|
||||
(inherit p1)
|
||||
(version "1")
|
||||
(inputs (modify-inputs (package-inputs p1)
|
||||
(replace "hello" coreutils))))))
|
||||
(lookup-package-input p2 "hello")))
|
||||
|
||||
(test-eq "modify-inputs, replace, change output"
|
||||
guile-3.0
|
||||
;; Replace an input and choose a different output.
|
||||
(let* ((p1 (dummy-package "p"
|
||||
(inputs (list `(,coreutils "debug")))))
|
||||
(p2 (package
|
||||
(inherit p1)
|
||||
(version "1")
|
||||
(inputs (modify-inputs (package-inputs p1)
|
||||
(replace "coreutils" `(,guile-3.0 "out")))))))
|
||||
(match (package-inputs p2)
|
||||
((("coreutils" input "out"))
|
||||
input))))
|
||||
|
||||
(test-end "packages")
|
||||
|
||||
;;; Local Variables:
|
||||
|
|
Loading…
Reference in a new issue