mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 13:10:33 +02:00
utils: Fix default-keyword-arguments.
* guix/utils.scm (default-keyword-arguments): Properly test for present keywords. * tests/utils.scm (default-keyword-arguments): New test.
This commit is contained in:
@@ -111,6 +111,18 @@
|
||||
(ensure-keyword-arguments '(#:foo 2) '(#:bar 3))
|
||||
(ensure-keyword-arguments '(#:foo 2) '(#:bar 3 #:foo 42))))
|
||||
|
||||
(test-equal "default-keyword-arguments"
|
||||
'((#:foo 2)
|
||||
(#:foo 2)
|
||||
(#:foo 2 #:bar 3)
|
||||
(#:foo 2 #:bar 3)
|
||||
(#:foo 2 #:bar 3))
|
||||
(list (default-keyword-arguments '() '(#:foo 2))
|
||||
(default-keyword-arguments '(#:foo 2) '(#:foo 4))
|
||||
(default-keyword-arguments '() '(#:bar 3 #:foo 2))
|
||||
(default-keyword-arguments '(#:bar 3) '(#:foo 2))
|
||||
(default-keyword-arguments '(#:foo 2 #:bar 3) '(#:bar 6))))
|
||||
|
||||
(test-assert "filtered-port, file"
|
||||
(let* ((file (search-path %load-path "guix.scm"))
|
||||
(input (open-file file "r0b")))
|
||||
|
||||
Reference in New Issue
Block a user