guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 781c25ada98d70da41c4b2894ddf9216298cf133
Author: Phillip Davis <[email protected]>
AuthorDate: Sat Mar 21 12:05:08 2026 -0400

    tests: import: gem: Add test for mixed valid and gibberish licenses.
    
    Verifies that when only one of multiple license strings is recognized,
    the resulting list has the correct license followed by one instance
    of the symbol 'unknown-license!
    
    * tests/import/gem.scm (test-mixed-licenses-json): New fixture.
      ("gem->guix-package with mixed valid and gibberish licenses"):
      New test.
    
    Change-Id: I33a003d50ba20d30360b52c448ae28ad9d37233b
    Merges: https://codeberg.org/guix/guix/pulls/8276
    Reviewed-by: Carlo Zancanaro <[email protected]>
    Signed-off-by: Nguyễn Gia Phong <[email protected]>
---
 tests/import/gem.scm | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/tests/import/gem.scm b/tests/import/gem.scm
index c1b1afb32d..56907f445c 100644
--- a/tests/import/gem.scm
+++ b/tests/import/gem.scm
@@ -151,6 +151,19 @@
   \"licenses\": [\"foo\", \"bar\"]
 }")
 
+(define test-mixed-licenses-json
+  "{
+  \"name\": \"mixed-license-gem\",
+  \"version\": \"1.0.0\",
+  \"sha\": 
\"f3676eafca9987cb5fe263df1edf2538bf6dafc712b30e17be3543a9680547a8\",
+  \"info\": \"A gem with one valid and one gibberish license\",
+  \"homepage_uri\": \"https://example.com\";,
+  \"dependencies\": {
+    \"runtime\": []
+  },
+  \"licenses\": [\"MIT\", \"nonsense\"]
+}")
+
 (test-begin "gem")
 
 (test-assert "gem->guix-package"
@@ -453,4 +466,5 @@ and one gibberish license.")
        #t)
       (x
        (pk 'fail x #f)))))
+
 (test-end "gem")

Reply via email to