From 733b4130d75281a0bd634bc84600bcc2ea44a317 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 19 Nov 2012 22:39:45 +0100 Subject: guix-package: Add `--list-installed'. * guix-package.in (show-help, %options): Add `--list-installed'. (guix-package): Move main body to... [process-actions]: ... here. New internal procedure. [process-query]: New procedure. * tests/guix-package.sh: Add tests for `--list-installed'. * doc/guix.texi (Invoking guix-package): Document it. --- tests/guix-package.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests') diff --git a/tests/guix-package.sh b/tests/guix-package.sh index 7363cfc945..6c457ffd4b 100644 --- a/tests/guix-package.sh +++ b/tests/guix-package.sh @@ -36,6 +36,20 @@ guix-package -b -p "$profile" \ test -L "$profile-2-link" test -f "$profile/bin/make" && test -f "$profile/bin/guile" + +# Check whether `--list-installed' works. +# XXX: Change the tests when `--install' properly extracts the package +# name and version string. +installed="`guix-package -p "$profile" --list-installed | cut -f1 | xargs echo | sort`" +case "x$installed" in + "guile* make*") true;; + "make* guile*") true;; + "*") false;; +esac + +test "`guix-package -p "$profile" -I 'g.*e' | cut -f1`" = "guile-bootstrap-2.0" + +# Remove a package. guix-package -b -p "$profile" -r "guile-bootstrap-2.0" test -L "$profile-3-link" test -f "$profile/bin/make" && ! test -f "$profile/bin/guile" -- cgit v1.2.3