From 739380542da7e434c581ec620edeb4348d6ece89 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 12 Feb 2019 22:17:11 +0100 Subject: inferior: Add 'inferior-available-packages'. * guix/inferior.scm (inferior-available-packages): New procedure. * tests/inferior.scm ("inferior-available-packages"): New test. --- tests/inferior.scm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'tests') 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 +;;; Copyright © 2018, 2019 Ludovic Courtès ;;; ;;; 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) + (stringlist (lambda (package) (list (package-name package) -- cgit v1.2.3