diff options
author | Ludovic Courtès <ludo@gnu.org> | 2012-11-19 22:39:45 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2012-11-19 23:04:35 +0100 |
commit | 733b4130d75281a0bd634bc84600bcc2ea44a317 (patch) | |
tree | 1473323cb5e4786cdd28e9f652a1b774cd3f1de6 /tests | |
parent | c6f09dfadee0baeb1fe0633d5885c01b4c043931 (diff) | |
download | patches-733b4130d75281a0bd634bc84600bcc2ea44a317.tar patches-733b4130d75281a0bd634bc84600bcc2ea44a317.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/guix-package.sh | 14 |
1 files changed, 14 insertions, 0 deletions
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" |