summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/import-utils.scm22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index 5c0c041360..c3ab25d788 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -23,6 +23,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix build-system)
+ #:use-module (gnu packages)
#:use-module (srfi srfi-64))
(test-begin "import-utils")
@@ -98,4 +99,25 @@
(or (package-license (alist->package meta))
'license-is-false)))
+(test-equal "alist->package with dependencies"
+ `(("gettext" ,(specification->package "gettext")))
+ (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.")
+ ;
+ ;; Note: As with Guile-JSON 3.x, JSON arrays are represented
+ ;; by vectors.
+ ("native-inputs" . #("gettext"))
+
+ ("license" . #f))))
+ (package-native-inputs (alist->package meta))))
+
(test-end "import-utils")