summaryrefslogtreecommitdiff
path: root/tests/import-utils.scm
diff options
context:
space:
mode:
authoritd <itd@net.in.tum.de>2022-09-23 09:42:53 +0200
committerLudovic Courtès <ludo@gnu.org>2022-09-29 22:59:48 +0200
commit61bd7bf4690329a10e0a1d3fd1425a73d1823576 (patch)
tree4f4114030b40502938c1da226d055d2e9dcc7ba8 /tests/import-utils.scm
parent168a7933c0e138dc7061a3f0dc96871e16da5c5f (diff)
import/utils: alist->package: Include properties.
* guix/import/utils.scm (alist->package): Process properties field in input data and include it in the generated package. * tests/import-utils.scm ("alist->package with properties"): New test. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'tests/import-utils.scm')
-rw-r--r--tests/import-utils.scm19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/import-utils.scm b/tests/import-utils.scm
index 7c6c782917..c47348fc60 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -203,4 +203,23 @@
("license" . #f))))
(package-native-inputs (alist->package meta))))
+(test-assert "alist->package with properties"
+ (let* ((meta '(("name" . "hello")
+ ("version" . "2.10")
+ ("source" .
+ ;; Use a 'file://' URI so that we don't cause a download.
+ ,(string-append "file://"
+ (search-path %load-path "guix.scm")))
+ ("build-system" . "gnu")
+ ("properties" . (("hidden?" . #t)
+ ("upstream-name" . "hello-upstream")))
+ ("home-page" . "https://gnu.org")
+ ("synopsis" . "Say hi")
+ ("description" . "This package says hi.")
+ ("license" . "GPL-3.0+")))
+ (pkg (alist->package meta)))
+ (and (package? pkg)
+ (equal? (package-upstream-name pkg) "hello-upstream")
+ (hidden-package? pkg))))
+
(test-end "import-utils")