From 387e6b9e340ce4b401f220f72881415623a466f7 Mon Sep 17 00:00:00 2001 From: Chris Marusich Date: Mon, 6 May 2019 01:51:30 -0700 Subject: ui: Make package outputs searchable. * guix/ui.scm (relevance): Allow the "field" procedure of a metric to return a list, and handle that case appropriately. Update docstring. (%package-metrics): Add a metric for package outputs. * guix/scripts/package.scm (find-packages-by-description): Update docstring. * tests/guix-package.sh: Add a test case to verify that package outputs are included in search results. Co-authored-by: Tobias Geerinckx-Rice --- tests/guix-package.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/guix-package.sh') diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 0d60481895..262d29bd59 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -398,3 +398,28 @@ else grep "manifest.scm:[1-3]:.*wonderful-package.*: unbound variable" \ "$module_dir/stderr" fi + +# Verify that package outputs are included in search results. +rm -rf "$module_dir" +mkdir "$module_dir" +cat > "$module_dir/foo.scm"< /tmp/out +test "`guix package -L "$module_dir" -s dummy-output | grep ^name:`" = "name: dummy-package" +rm -rf "$module_dir" -- cgit v1.2.3