diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2014-10-01 10:19:14 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2014-10-05 21:57:19 +0200 |
| commit | 5e1103821a566e55c848c8fa323d07801cce6ab7 (patch) | |
| tree | 866d0ce8fe5307eac5782f397067cfa3790eb0c1 /tests | |
| parent | b72a312c307131703bd65a9e2db04cd9b35d0fbe (diff) | |
utils: Add 'strip-keyword-arguments'.
* guix/utils.scm (strip-keyword-arguments): New procedure.
* tests/utils.scm ("strip-keyword-arguments"): New test.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/utils.scm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/utils.scm b/tests/utils.scm index 611867ca09f..a662c9a8d38 100644 --- a/tests/utils.scm +++ b/tests/utils.scm | |||
| @@ -120,6 +120,12 @@ | |||
| 120 | '(0 1 2 3))) | 120 | '(0 1 2 3))) |
| 121 | list)) | 121 | list)) |
| 122 | 122 | ||
| 123 | (test-equal "strip-keyword-arguments" | ||
| 124 | '(a #:b b #:c c) | ||
| 125 | (strip-keyword-arguments '(#:foo #:bar #:baz) | ||
| 126 | '(a #:foo 42 #:b b #:baz 3 | ||
| 127 | #:c c #:bar 4))) | ||
| 128 | |||
| 123 | (let* ((tree (alist->vhash | 129 | (let* ((tree (alist->vhash |
| 124 | '((0 2 3) (1 3 4) (2) (3 5 6) (4 6) (5) (6)) | 130 | '((0 2 3) (1 3 4) (2) (3 5 6) (4 6) (5) (6)) |
| 125 | hashq)) | 131 | hashq)) |
