summaryrefslogtreecommitdiff
path: root/tests/lint.scm
diff options
context:
space:
mode:
author宋文武 <iyzsong@gmail.com>2015-05-23 09:43:12 +0800
committer宋文武 <iyzsong@gmail.com>2015-05-23 09:43:12 +0800
commit86a81222cad9841c67e9d9bcd46c567383e9a34f (patch)
treed976896cba87c5de65d8fdc4bf0be85880c04153 /tests/lint.scm
parent3e3d47fc5347a5032fd2039831be1dc1d80576ed (diff)
parent8605321dd6f3c42590046be9d69112a8c8cf7cbf (diff)
Merge branch 'master' into gtk-rebuild
Conflicts: gnu/packages/gtk.scm
Diffstat (limited to 'tests/lint.scm')
-rw-r--r--tests/lint.scm30
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/lint.scm b/tests/lint.scm
index c0599224b7..2807eba1cc 100644
--- a/tests/lint.scm
+++ b/tests/lint.scm
@@ -18,8 +18,7 @@
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
-
-(define-module (test-packages)
+(define-module (test-lint)
#:use-module (guix tests)
#:use-module (guix download)
#:use-module (guix build-system gnu)
@@ -302,9 +301,34 @@ requests."
(uri "someurl")
(sha256 "somesha")
(patches (list "/path/to/y.patch")))))))
- (check-patches pkg)))
+ (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 "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