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 | |
| parent | 95cd4971d07fe312a4e0d21b72e7bf1bba493753 (diff) | |
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')
| -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 9a2dbee35a8..823ede1f25a 100644 --- a/tests/packages.scm +++ b/tests/packages.scm | |||
| @@ -788,6 +788,15 @@ | |||
| 788 | (guix-package "-p" (derivation->output-path prof) | 788 | (guix-package "-p" (derivation->output-path prof) |
| 789 | "--search-paths")))))) | 789 | "--search-paths")))))) |
| 790 | 790 | ||
| 791 | (test-equal "specification->package when not found" | ||
| 792 | 'quit | ||
| 793 | (catch 'quit | ||
| 794 | (lambda () | ||
| 795 | ;; This should call 'leave', producing an error message. | ||
| 796 | (specification->package "this-package-does-not-exist")) | ||
| 797 | (lambda (key . args) | ||
| 798 | key))) | ||
| 799 | |||
| 791 | (test-end "packages") | 800 | (test-end "packages") |
| 792 | 801 | ||
| 793 | 802 | ||
