summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2018-02-16 13:14:26 -0500
committerMark H Weaver <mhw@netris.org>2018-02-16 13:14:26 -0500
commit150062f19060687dbf8e2cbe6a22c2f8600e7c4e (patch)
tree4c25afac34832d118407180d66121f1a2f0c761d /tests
parent54a93355c22ab533743cd948cf7b57993c789686 (diff)
parent6a3cf4e6c7d77634d67902215f0017c12455c6fb (diff)
downloadguix-150062f19060687dbf8e2cbe6a22c2f8600e7c4e.tar.gz
Merge branch 'master' into core-updates
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 f4bbd335b9..5c0c041360 100644
--- a/tests/import-utils.scm
+++ b/tests/import-utils.scm
@@ -79,4 +79,23 @@
          (equal? (origin-sha256 (package-source pkg))
                  (base32 "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))))
 
+(test-equal "alist->package with false license"  ;<https://bugs.gnu.org/30470>
+  'license-is-false
+  (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" . #f))))
+    ;; Note: Use 'or' because comparing with #f otherwise succeeds when
+    ;; there's an exception instead of an actual #f.
+    (or (package-license (alist->package meta))
+        'license-is-false)))
+
 (test-end "import-utils")