[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/10: tests: Exercise 'modify-inputs' with a 'replace' clause.
From: |
guix-commits |
Subject: |
02/10: tests: Exercise 'modify-inputs' with a 'replace' clause. |
Date: |
Wed, 16 Mar 2022 10:50:20 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e3801126a9566bc89c3746a54128609ad6eff1fd
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Mar 15 15:17:04 2022 +0100
tests: Exercise 'modify-inputs' with a 'replace' clause.
* tests/packages.scm ("modify-inputs, replace")
("modify-inputs, replace, change output"): New tests.
---
tests/packages.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/tests/packages.scm b/tests/packages.scm
index 02bdba5f98..2cb90d3145 100644
--- a/tests/packages.scm
+++ b/tests/packages.scm
@@ -1956,6 +1956,32 @@
(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:
- branch master updated (53d986215f -> 797e308047), guix-commits, 2022/03/16
- 01/10: gnu : nicotine+: Update to 3.2.1., guix-commits, 2022/03/16
- 04/10: gnu: cryfs: Update to 0.11.2., guix-commits, 2022/03/16
- 03/10: packages: 'modify-inputs' preserves outputs in 'replace' clauses., guix-commits, 2022/03/16
- 09/10: gnu: matterbridge: update to 1.24.0, guix-commits, 2022/03/16
- 05/10: system: Improve 'read-boot-parameters' incompatibility diagnostic., guix-commits, 2022/03/16
- 08/10: gnu: Add python-mathlibtools., guix-commits, 2022/03/16
- 06/10: gnu: python-gitlab: update to 3.2.0, guix-commits, 2022/03/16
- 07/10: gnu: dunst: Update to 1.8.1., guix-commits, 2022/03/16
- 02/10: tests: Exercise 'modify-inputs' with a 'replace' clause.,
guix-commits <=
- 10/10: gnu: Add tessen., guix-commits, 2022/03/16