diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-03-08 11:48:21 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-03-08 11:48:21 +0100 |
commit | efb107e0cd34fa0ed656441bf6e2414253c0344a (patch) | |
tree | 298d7fc6967eaa8158a86af89bee59914ce7799c /tests/packages.scm | |
parent | 95cd4971d07fe312a4e0d21b72e7bf1bba493753 (diff) | |
download | guix-efb107e0cd34fa0ed656441bf6e2414253c0344a.tar guix-efb107e0cd34fa0ed656441bf6e2414253c0344a.tar.gz |
packages: Gracefully report packages not found.
Fixes a thinko introduced in 1b846da8c372bee78851439fd9e72b2499115e5a
that would lead to a backtrace when looking for an unknown package.
* gnu/packages.scm (%find-package): Correct logic when checking for
FALLBACK?.
Diffstat (limited to 'tests/packages.scm')
-rw-r--r-- | tests/packages.scm | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index 9a2dbee35a..823ede1f25 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -788,6 +788,15 @@ (guix-package "-p" (derivation->output-path prof) "--search-paths")))))) +(test-equal "specification->package when not found" + 'quit + (catch 'quit + (lambda () + ;; This should call 'leave', producing an error message. + (specification->package "this-package-does-not-exist")) + (lambda (key . args) + key))) + (test-end "packages") |