From 002c57c6f7d51077e4796106177456ebb564e25a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 12 Apr 2015 23:14:19 +0200 Subject: lint: Add a 'derivation' checker. * guix/scripts/lint.scm (check-derivation): New procedure. (%checkers): Add 'derivation' checker. * tests/lint.scm ("derivation: invalid arguments"): New test. --- tests/lint.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests') diff --git a/tests/lint.scm b/tests/lint.scm index ab89a58ae6..2807eba1cc 100644 --- a/tests/lint.scm +++ b/tests/lint.scm @@ -319,6 +319,16 @@ (define-syntax-rule (with-warnings body ...) (check-patch-file-names pkg))) "patch not found"))) +(test-assert "derivation: invalid arguments" + (->bool + (string-contains + (with-warnings + (let ((pkg (dummy-package "x" + (arguments + '(#:imported-modules (invalid-module)))))) + (check-derivation pkg))) + "failed to create derivation"))) + (test-assert "home-page: wrong home-page" (->bool (string-contains -- cgit v1.2.3