diff options
author | Ludovic Courtès <ludo@gnu.o | |
---|---|---|
2021-07-08 | mailmap: Update entries for Matthew James Kraai.... | Matthew James Kraai |
tree | 660452112c065299779ab5aaab5ff6416c7fb316 /tests | |
parent | 3e43166ffc11fb117c55da594e57866a75625900 (diff) | |
download | guix-76c486196f299716be33df86d06b3ce2b79dd77f.tar.gz guix-76c486196f299716be33df86d06b3ce2b79dd77f.zip |
packages: Catch invalid input errors for structs.
Reported by Thomas Sigurdsen <thomas.sigurdsen@gmail.com>
at <https://lists.gnu.org/archive/html/help-guix/2017-04/msg00007.html>.
* guix/packages.scm (expand-input): Add 'guard' form around call to
'package-source-derivation'.
* tests/packages.scm (dummy): New test.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/packages.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/packages.scm b/tests/packages.scm index aa29758830..51dc1ba2b0 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -470,6 +470,14 @@ (package-derivation %store p) #f))) +(let ((dummy (dummy-package "foo" (inputs `(("x" ,(current-module))))))) + (test-equal "&package-input-error" + (list dummy (current-module)) + (guard (c ((package-input-error? c) + (list (package-error-package c) + (package-error-invalid-input c)))) + (package-derivation %store dummy)))) + (test-assert "reference to non-existent output" ;; See <http://bugs.gnu.org/19630>. (parameterize ((%graft? #f)) |