summaryrefslogtreecommitdiff
path: root/tests
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
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')
-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 7c6c782917d..c47348fc608 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -203,4 +203,23 @@
203 ("license" . #f)))) 203 ("license" . #f))))
204 (package-native-inputs (alist->package meta)))) 204 (package-native-inputs (alist->package meta))))
205 205
206(test-assert "alist->package with properties"
207 (let* ((meta '(("name" . "hello")
208 ("version" . "2.10")
209 ("source" .
210 ;; Use a 'file://' URI so that we don't cause a download.
211 ,(string-append "file://"
212 (search-path %load-path "guix.scm")))
213 ("build-system" . "gnu")
214 ("properties" . (("hidden?" . #t)
215 ("upstream-name" . "hello-upstream")))
216 ("home-page" . "https://gnu.org")
217 ("synopsis" . "Say hi")
218 ("description" . "This package says hi.")
219 ("license" . "GPL-3.0+")))
220 (pkg (alist->package meta)))
221 (and (package? pkg)
222 (equal? (package-upstream-name pkg) "hello-upstream")
223 (hidden-package? pkg))))
224
206(test-end "import-utils") 225(test-end "import-utils")