1
0
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:
Eric Bavier
2016-09-01 08:20:25 -05:00
parent fb29e737d4
commit 347df60158
2 changed files with 13 additions and 1 deletions

View File

@@ -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")))