summary refs log tree commit diff
path: root/tests/lint.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-10 10:27:26 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-10 10:27:46 +0200
commitb210b35d61e41ab5c3ad923eacc8ecbd58d3edca (patch)
treeacf6259a6c223f49941c6f909b2a05989b843b92 /tests/lint.scm
parent56b1b74c903c17b03ef5b0052a1144bb1e55685f (diff)
downloadguix-b210b35d61e41ab5c3ad923eacc8ecbd58d3edca.tar.gz
lint: Report patches that cannot be found.
* guix/scripts/lint.scm (check-patch-file-names): Wrap body in 'guard'.
* tests/lint.scm ("patches: not found"): New test.
Diffstat (limited to 'tests/lint.scm')
-rw-r--r--tests/lint.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index 047f2786e0..ab89a58ae6 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -304,6 +304,21 @@ requests."
          (check-patch-file-names pkg)))
      "file names of patches should start with the package name")))
 
+(test-assert "patches: not found"
+  (->bool
+   (string-contains
+     (with-warnings
+       (let ((pkg (dummy-package "x"
+                    (source
+                     (origin
+                       (method url-fetch)
+                       (uri "someurl")
+                       (sha256 "somesha")
+                       (patches
+                        (list (search-patch "this-patch-does-not-exist!"))))))))
+         (check-patch-file-names pkg)))
+     "patch not found")))
+
 (test-assert "home-page: wrong home-page"
   (->bool
    (string-contains