File tree Expand file tree Collapse file tree 2 files changed +18
-39
lines changed Expand file tree Collapse file tree 2 files changed +18
-39
lines changed Original file line number Diff line number Diff line change 2222# Sort the entries below via IntelliJ's "Edit" -> "Sort Lines".
2323---
2424
25- # Ambiguous mappings (mapping reason not obvious without additional information)
26- ALv2 : Apache-2.0
27- ASL : Apache-2.0
28- Apache-style : Apache-2.0
29- Apache : Apache-2.0
30- BSD-like : BSD-3-Clause
31- BSD-style : BSD-3-Clause
32- BSD : BSD-3-Clause
33- GPL : GPL-2.0-or-later
34- MPL : MPL-2.0
35- afl : AFL-3.0
36- agpl : AGPL-3.0-or-later
37- apache-license : Apache-2.0
38- bsd-license : BSD-3-Clause
39- bsd-licensed : BSD-3-Clause
40- cddl : CDDL-1.0
41- efl : EFL-2.0
42- epl : EPL-1.0
43- eupl : EUPL-1.0
44- fdl : GFDL-1.3-or-later
45- gfdl : GFDL-1.3-or-later
46- gpl-license : GPL-2.0-or-later
47- psf : PSF-2.0
48- psfl : PSF-2.0
49- python : Python-2.0
50-
51- # Non-ambiguous mappings
5225AFLv2.1 : AFL-2.1
26+ ALv2 : Apache-2.0
5327APACHEv2 : Apache-2.0
5428APL2 : Apache-2.0
5529APLv2.0 : Apache-2.0
@@ -59,11 +33,7 @@ Apache2: Apache-2.0
5933BSD-3 : BSD-3-Clause
6034BSD2 : BSD-2-Clause
6135BSD3 : BSD-3-Clause
62- Boost : BSL-1.0
6336Bouncy : MIT
64- CC0 : CC0-1.0
65- CPL : CPL-1.0
66- CeCILL : CECILL-1.1
6737EDL-1.0 : BSD-3-Clause
6838FreeBSD : BSD-2-Clause-Views
6939GPL-2 : GPL-2.0-only
@@ -74,31 +44,24 @@ GPLv3+: GPL-3.0-or-later
7444GPLv3 : GPL-3.0-only
7545ISCL : ISC
7646LGPL-3 : LGPL-3.0-only
77- LGPL2 : LGPL-2.1-only
7847LGPL3 : LGPL-3.0-only
79- LGPL : LGPL-2.0-or-later
80- LGPLv2 : LGPL-2.1-only
8148LGPLv3+ : LGPL-3.0-or-later
8249LGPLv3 : LGPL-3.0-only
8350MIT-like : MIT
8451MIT-style : MIT
8552MPLv2.0 : MPL-2.0
8653MPLv2 : MPL-2.0
87- ODBL : ODbL-1.0
8854PSF2 : PSF-2.0
8955UNLICENSED : Unlicense
9056Unlicence : Unlicense
91- Vovida : VSL-1.0
9257afl-2 : AFL-2.0
9358afl2.0 : AFL-2.0
9459afl2.1 : AFL-2.1
9560afl2 : AFL-2.0
9661bouncy-license : MIT
9762bsl1.0 : BSL-1.0
98- bsl : BSL-1.0
9963cddl1.0 : CDDL-1.0
10064cddl1.1 : CDDL-1.1
101- cpal : CPAL-1.0
10265epl1.0 : EPL-1.0
10366epl2.0 : EPL-2.0
10467eupl1.0 : EUPL-1.0
@@ -113,4 +76,3 @@ mpl2.0: MPL-2.0
11376mpl2 : MPL-2.0
11477w3cl : W3C
11578wtf : WTFPL
116- zope : ZPL-2.1
Original file line number Diff line number Diff line change @@ -57,6 +57,23 @@ class SpdxSimpleLicenseMappingTest : WordSpec({
5757 if (license.id.endsWith("-only")) key should containADigit()
5858 }
5959 }
60+
61+ " contain equal digits omitting trailing zeros" {
62+ val exceptions = mapOf(
63+ // See https://www.eclipse.org/org/documents/edl-v10.php.
64+ "EDL -1.0" to SpdxLicense .BSD_3_CLAUSE ,
65+ // See https://spdx.org/licenses/BSD -2-Clause -Views .html.
66+ "FreeBSD " to SpdxLicense .BSD_2_CLAUSE_VIEWS
67+ )
68+
69+ SpdxSimpleLicenseMapping .simpleLicenseMapping.filterNot {
70+ it in exceptions.entries
71+ }.forAll { (key, license) ->
72+ val digitsInKey = key.filter { it.isDigit() }.dropLastWhile { it == ' 0' }
73+ val digitsInLicense = license.id.filter { it.isDigit() }.dropLastWhile { it == ' 0' }
74+ digitsInKey shouldBe digitsInLicense
75+ }
76+ }
6077 }
6178
6279 " The simple expression mapping" should {
You can’t perform that action at this time.
0 commit comments