summaryrefslogtreecommitdiff
path: root/tests/import-utils.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/import-utils.scm')
-rw-r--r--tests/import-utils.scm40
1 files changed, 37 insertions, 3 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index 87dda3238f..874816442e 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2017 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2020 Martin Becze <mjbecze@riseup.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,15 +49,16 @@
(package
(name "foo")
(inputs `(("bar" ,bar)))))
- (recursive-import "foo" 'repo
+ (recursive-import "foo"
+ #:repo 'repo
#:repo->guix-package
(match-lambda*
- (("foo" 'repo)
+ (("foo" #:version #f #:repo 'repo)
(values '(package
(name "foo")
(inputs `(("bar" ,bar))))
'("bar")))
- (("bar" 'repo)
+ (("bar" #:version #f #:repo 'repo)
(values '(package
(name "bar"))
'())))
@@ -120,6 +122,38 @@
(or (package-license (alist->package meta))
'license-is-false)))
+(test-equal "alist->package with SPDX license name 1/2" ;<https://bugs.gnu.org/45453>
+ license:expat
+ (let* ((meta '(("name" . "hello")
+ ("version" . "2.10")
+ ("source" . (("method" . "url-fetch")
+ ("uri" . "mirror://gnu/hello/hello-2.10.tar.gz")
+ ("sha256" .
+ (("base32" .
+ "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))))
+ ("build-system" . "gnu")
+ ("home-page" . "https://gnu.org")
+ ("synopsis" . "Say hi")
+ ("description" . "This package says hi.")
+ ("license" . "expat"))))
+ (package-license (alist->package meta))))
+
+(test-equal "alist->package with SPDX license name 2/2" ;<https://bugs.gnu.org/45453>
+ license:expat
+ (let* ((meta '(("name" . "hello")
+ ("version" . "2.10")
+ ("source" . (("method" . "url-fetch")
+ ("uri" . "mirror://gnu/hello/hello-2.10.tar.gz")
+ ("sha256" .
+ (("base32" .
+ "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))))
+ ("build-system" . "gnu")
+ ("home-page" . "https://gnu.org")
+ ("synopsis" . "Say hi")
+ ("description" . "This package says hi.")
+ ("license" . "MIT"))))
+ (package-license (alist->package meta))))
+
(test-equal "alist->package with dependencies"
`(("gettext" ,(specification->package "gettext")))
(let* ((meta '(("name" . "hello")