;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 David Thompson <davet@gnu.org>
;;; Copyright © 2016 David Craven <david@craven.ch>
-;;; Copyright © 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2019, 2020 Ludovic Courtès <ludo@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
\"dependencies\": [
{
\"crate_id\": \"bar\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
}
]
}")
\"dependencies\": [
{
\"crate_id\": \"intermediate-1\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
},
{
\"crate_id\": \"intermediate-2\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
}
{
\"crate_id\": \"leaf-alice\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
},
{
\"crate_id\": \"leaf-bob\",
- \"kind\": \"normal\",
- },
+ \"kind\": \"normal\"
+ }
]
}")
\"dependencies\": [
{
\"crate_id\": \"intermediate-2\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
},
{
\"crate_id\": \"leaf-alice\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
},
{
\"crate_id\": \"leaf-bob\",
- \"kind\": \"normal\",
+ \"kind\": \"normal\"
}
]
}")
\"dependencies\": [
{
\"crate_id\": \"leaf-bob\",
- \"kind\": \"normal\",
- },
+ \"kind\": \"normal\"
+ }
]
}")
(define test-source-hash
"")
+\f
(test-begin "crate")
(test-equal "guix-package->crate-name"
(x
(pk 'fail x #f)))))
+(test-equal "licenses: MIT OR Apache-2.0"
+ '(license:expat license:asl2.0)
+ (string->license "MIT OR Apache-2.0"))
+
+(test-equal "licenses: Apache-2.0 / MIT"
+ '(license:asl2.0 license:expat)
+ (string->license "Apache-2.0 / MIT"))
+
+(test-equal "licenses: Apache-2.0 WITH LLVM-exception"
+ '(license:asl2.0 unknown-license!)
+ (string->license "Apache-2.0 WITH LLVM-exception"))
+
+(test-equal "licenses: MIT/Apache-2.0 AND BSD-2-Clause"
+ '(license:expat license:asl2.0 unknown-license!)
+ (string->license "MIT/Apache-2.0 AND BSD-2-Clause"))
+
+(test-equal "licenses: MIT/Apache-2.0"
+ '(license:expat license:asl2.0)
+ (string->license "MIT/Apache-2.0"))
+
(test-end "crate")