diff options
author | Ludovic Courtès <ludo@gnu.org> | 2018-09-04 17:22:55 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2018-09-04 17:22:55 +0200 |
commit | 7e1d229019c1924a2748e5daec2a619e7efbd7d7 (patch) | |
tree | 13a9ee538f851ec4ab28d173d75f13d241dc4b85 /tests/inferior.scm | |
parent | 1bf758767d1553594b6d7534ca8c38a2171b5afe (diff) | |
download | guix-7e1d229019c1924a2748e5daec2a619e7efbd7d7.tar.gz |
inferior: Add home-page and location package accessors.
* guix/inferior.scm (inferior-package-home-page) (inferior-package-location): New procedures. * tests/inferior.scm ("inferior-packages"): Test them.
Diffstat (limited to 'tests/inferior.scm')
-rw-r--r-- | tests/inferior.scm | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/inferior.scm b/tests/inferior.scm index 5e0f8ae66e..ff5cad4210 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -45,9 +45,11 @@ (test-equal "inferior-packages" (take (sort (fold-packages (lambda (package lst) - (alist-cons (package-name package) + (cons (list (package-name package) (package-version package) - lst)) + (package-home-page package) + (package-location package)) + lst)) '()) (lambda (x y) (string<? (car x) (car y)))) @@ -56,14 +58,18 @@ #:command "scripts/guix")) (packages (inferior-packages inferior))) (and (every string? (map inferior-package-synopsis packages)) - (begin + (let () + (define result + (take (sort (map (lambda (package) + (list (inferior-package-name package) + (inferior-package-version package) + (inferior-package-home-page package) + (inferior-package-location package))) + packages) + (lambda (x y) + (string<? (car x) (car y)))) + 10)) (close-inferior inferior) - (take (sort (map (lambda (package) - (cons (inferior-package-name package) - (inferior-package-version package))) - packages) - (lambda (x y) - (string<? (car x) (car y)))) - 10))))) + result)))) (test-end "inferior") |