diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-02-14 00:20:28 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2019-02-14 00:20:28 +0100 |
commit | 6901878894e9c6405fa811c512a32f448e8b9fa2 (patch) | |
tree | 5b04c4234f4022533692c36a83047ec9801aada9 /tests | |
parent | baf766a7ff9db45c707b4539176f2143fbd90efd (diff) | |
parent | 58c6a93d9d60660d8425d8c52d4b73a42d4a5b55 (diff) | |
download | guix-6901878894e9c6405fa811c512a32f448e8b9fa2.tar.gz |
Merge branch 'master' into staging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/inferior.scm | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/inferior.scm b/tests/inferior.scm index d5a894ca8f..71ebf8f59b 100644 --- a/tests/inferior.scm +++ b/tests/inferior.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2018 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,6 +89,26 @@ (close-inferior inferior) result)))) +(test-equal "inferior-available-packages" + (take (sort (fold-available-packages + (lambda* (name version result + #:key supported? deprecated? + #:allow-other-keys) + (if (and supported? (not deprecated?)) + (alist-cons name version result) + result)) + '()) + (lambda (x y) + (string<? (car x) (car y)))) + 10) + (let* ((inferior (open-inferior %top-builddir + #:command "scripts/guix")) + (packages (inferior-available-packages inferior))) + (close-inferior inferior) + (take (sort packages (lambda (x y) + (string<? (car x) (car y)))) + 10))) + (test-equal "lookup-inferior-packages" (let ((->list (lambda (package) (list (package-name package) |