package main

import (
	"encoding/json"
	"os"
	"testing"

	"github.com/google/go-cmp/cmp"
	"github.com/stretchr/testify/require"
)

func TestReplaceDeprecatedLicenses(t *testing.T) {
	results := LicenseList{
		Licenses: []License{
			license1,
			license2,
			license3,
			license4,
			license5,
			license6,
		},
	}

	expected := map[string]string{
		"abc1":            "ABC-1.0-only",
		"abc1only":        "ABC-1.0-only",
		"abc1.0":          "ABC-1.0-only",
		"abc1.0.0":        "ABC-1.0-only",
		"abc1.0only":      "ABC-1.0-only",
		"abc1.0.0only":    "ABC-1.0-only",
		"abc1+":           "ABC-1.0-or-later",
		"abc1.0+":         "ABC-1.0-or-later",
		"abc1.0.0+":       "ABC-1.0-or-later",
		"abc1orlater":     "ABC-1.0-or-later",
		"abc1.0orlater":   "ABC-1.0-or-later",
		"abc1.0.0orlater": "ABC-1.0-or-later",
		"duh1":            "Duh-1.0",
		"duh1.0":          "Duh-1.0",
		"duh1.0.0":        "Duh-1.0",
		"duh1duh":         "Duh-1.0-duh",
		"duh1.0duh":       "Duh-1.0-duh",
		"duh1.0.0duh":     "Duh-1.0-duh",
	}

	licenses := processSPDXLicense(results)
	for k, v := range licenses {
		e := expected[k]
		require.Equal(t, e, v, k)
	}
}

func Test_processSPDXLicense(t *testing.T) {
	tests := []struct {
		fixture string
		want    map[string]string
	}{
		{
			fixture: "testdata/licenses.json",
			want: map[string]string{
				"0bsd":                                  "0BSD",
				"aal":                                   "AAL",
				"abstyles":                              "Abstyles",
				"adacoredoc":                            "AdaCore-doc",
				"adobe2006":                             "Adobe-2006",
				"adobe2006.0":                           "Adobe-2006",
				"adobe2006.0.0":                         "Adobe-2006",
				"adobeglyph":                            "Adobe-Glyph",
				"adsl":                                  "ADSL",
				"afl1":                                  "AFL-1.1",
				"afl1.1":                                "AFL-1.1",
				"afl1.1.0":                              "AFL-1.1",
				"afl1.2":                                "AFL-1.2",
				"afl1.2.0":                              "AFL-1.2",
				"afl2":                                  "AFL-2.0",
				"afl2.0":                                "AFL-2.0",
				"afl2.0.0":                              "AFL-2.0",
				"afl2.1":                                "AFL-2.1",
				"afl2.1.0":                              "AFL-2.1",
				"afl3":                                  "AFL-3.0",
				"afl3.0":                                "AFL-3.0",
				"afl3.0.0":                              "AFL-3.0",
				"afmparse":                              "Afmparse",
				"agpl1":                                 "AGPL-1.0-only",
				"agpl1+":                                "AGPL-1.0-or-later",
				"agpl1.0":                               "AGPL-1.0-only",
				"agpl1.0+":                              "AGPL-1.0-or-later",
				"agpl1.0.0":                             "AGPL-1.0-only",
				"agpl1.0.0+":                            "AGPL-1.0-or-later",
				"agpl1.0.0only":                         "AGPL-1.0-only",
				"agpl1.0.0orlater":                      "AGPL-1.0-or-later",
				"agpl1.0only":                           "AGPL-1.0-only",
				"agpl1.0orlater":                        "AGPL-1.0-or-later",
				"agpl1only":                             "AGPL-1.0-only",
				"agpl1orlater":                          "AGPL-1.0-or-later",
				"agpl3":                                 "AGPL-3.0-only",
				"agpl3+":                                "AGPL-3.0-or-later",
				"agpl3.0":                               "AGPL-3.0-only",
				"agpl3.0+":                              "AGPL-3.0-or-later",
				"agpl3.0.0":                             "AGPL-3.0-only",
				"agpl3.0.0+":                            "AGPL-3.0-or-later",
				"agpl3.0.0only":                         "AGPL-3.0-only",
				"agpl3.0.0orlater":                      "AGPL-3.0-or-later",
				"agpl3.0only":                           "AGPL-3.0-only",
				"agpl3.0orlater":                        "AGPL-3.0-or-later",
				"agpl3only":                             "AGPL-3.0-only",
				"agpl3orlater":                          "AGPL-3.0-or-later",
				"aladdin":                               "Aladdin",
				"amdplpa":                               "AMDPLPA",
				"aml":                                   "AML",
				"ampas":                                 "AMPAS",
				"antlrpd":                               "ANTLR-PD",
				"antlrpdfallback":                       "ANTLR-PD-fallback",
				"apache1":                               "Apache-1.0",
				"apache1.0":                             "Apache-1.0",
				"apache1.0.0":                           "Apache-1.0",
				"apache1.1":                             "Apache-1.1",
				"apache1.1.0":                           "Apache-1.1",
				"apache2":                               "Apache-2.0",
				"apache2.0":                             "Apache-2.0",
				"apache2.0.0":                           "Apache-2.0",
				"apafml":                                "APAFML",
				"apl1":                                  "APL-1.0",
				"apl1.0":                                "APL-1.0",
				"apl1.0.0":                              "APL-1.0",
				"apps2.0.0p":                            "App-s2p",
				"apps2.0p":                              "App-s2p",
				"apps2p":                                "App-s2p",
				"apsl1":                                 "APSL-1.0",
				"apsl1.0":                               "APSL-1.0",
				"apsl1.0.0":                             "APSL-1.0",
				"apsl1.1":                               "APSL-1.1",
				"apsl1.1.0":                             "APSL-1.1",
				"apsl1.2":                               "APSL-1.2",
				"apsl1.2.0":                             "APSL-1.2",
				"apsl2":                                 "APSL-2.0",
				"apsl2.0":                               "APSL-2.0",
				"apsl2.0.0":                             "APSL-2.0",
				"arphic1999":                            "Arphic-1999",
				"arphic1999.0":                          "Arphic-1999",
				"arphic1999.0.0":                        "Arphic-1999",
				"artistic1":                             "Artistic-1.0",
				"artistic1.0":                           "Artistic-1.0",
				"artistic1.0.0":                         "Artistic-1.0",
				"artistic1.0.0cl8":                      "Artistic-1.0-cl8",
				"artistic1.0.0perl":                     "Artistic-1.0-Perl",
				"artistic1.0cl8":                        "Artistic-1.0-cl8",
				"artistic1.0perl":                       "Artistic-1.0-Perl",
				"artistic1cl8":                          "Artistic-1.0-cl8",
				"artistic1perl":                         "Artistic-1.0-Perl",
				"artistic2":                             "Artistic-2.0",
				"artistic2.0":                           "Artistic-2.0",
				"artistic2.0.0":                         "Artistic-2.0",
				"baekmuk":                               "Baekmuk",
				"bahyph":                                "Bahyph",
				"barr":                                  "Barr",
				"beerware":                              "Beerware",
				"bitstreamcharter":                      "Bitstream-Charter",
				"bitstreamvera":                         "Bitstream-Vera",
				"bittorrent1":                           "BitTorrent-1.0",
				"bittorrent1.0":                         "BitTorrent-1.0",
				"bittorrent1.0.0":                       "BitTorrent-1.0",
				"bittorrent1.1":                         "BitTorrent-1.1",
				"bittorrent1.1.0":                       "BitTorrent-1.1",
				"blessing":                              "blessing",
				"blueoak1":                              "BlueOak-1.0.0",
				"blueoak1.0":                            "BlueOak-1.0.0",
				"blueoak1.0.0":                          "BlueOak-1.0.0",
				"borceux":                               "Borceux",
				"briangladman3.0.0clause":               "Brian-Gladman-3-Clause",
				"briangladman3.0clause":                 "Brian-Gladman-3-Clause",
				"briangladman3clause":                   "Brian-Gladman-3-Clause",
				"bsd1.0.0clause":                        "BSD-1-Clause",
				"bsd1.0clause":                          "BSD-1-Clause",
				"bsd1clause":                            "BSD-1-Clause",
				"bsd2.0.0clause":                        "BSD-2-Clause",
				"bsd2.0.0clausefreebsd":                 "BSD-2-Clause-Views",
				"bsd2.0.0clausenetbsd":                  "BSD-2-Clause",
				"bsd2.0.0clausepatent":                  "BSD-2-Clause-Patent",
				"bsd2.0.0clauseviews":                   "BSD-2-Clause-Views",
				"bsd2.0clause":                          "BSD-2-Clause",
				"bsd2.0clausefreebsd":                   "BSD-2-Clause-Views",
				"bsd2.0clausenetbsd":                    "BSD-2-Clause",
				"bsd2.0clausepatent":                    "BSD-2-Clause-Patent",
				"bsd2.0clauseviews":                     "BSD-2-Clause-Views",
				"bsd2clause":                            "BSD-2-Clause",
				"bsd2clausefreebsd":                     "BSD-2-Clause-Views",
				"bsd2clausenetbsd":                      "BSD-2-Clause",
				"bsd2clausepatent":                      "BSD-2-Clause-Patent",
				"bsd2clauseviews":                       "BSD-2-Clause-Views",
				"bsd3.0.0clause":                        "BSD-3-Clause",
				"bsd3.0.0clauseattribution":             "BSD-3-Clause-Attribution",
				"bsd3.0.0clauseclear":                   "BSD-3-Clause-Clear",
				"bsd3.0.0clauselbnl":                    "BSD-3-Clause-LBNL",
				"bsd3.0.0clausemodification":            "BSD-3-Clause-Modification",
				"bsd3.0.0clausenomilitarylicense":       "BSD-3-Clause-No-Military-License",
				"bsd3.0.0clausenonuclearlicense":        "BSD-3-Clause-No-Nuclear-License",
				"bsd3.0.0clausenonuclearlicense2014":    "BSD-3-Clause-No-Nuclear-License-2014",
				"bsd3.0.0clausenonuclearwarranty":       "BSD-3-Clause-No-Nuclear-Warranty",
				"bsd3.0.0clauseopenmpi":                 "BSD-3-Clause-Open-MPI",
				"bsd3.0clause":                          "BSD-3-Clause",
				"bsd3.0clauseattribution":               "BSD-3-Clause-Attribution",
				"bsd3.0clauseclear":                     "BSD-3-Clause-Clear",
				"bsd3.0clauselbnl":                      "BSD-3-Clause-LBNL",
				"bsd3.0clausemodification":              "BSD-3-Clause-Modification",
				"bsd3.0clausenomilitarylicense":         "BSD-3-Clause-No-Military-License",
				"bsd3.0clausenonuclearlicense":          "BSD-3-Clause-No-Nuclear-License",
				"bsd3.0clausenonuclearlicense2014":      "BSD-3-Clause-No-Nuclear-License-2014",
				"bsd3.0clausenonuclearwarranty":         "BSD-3-Clause-No-Nuclear-Warranty",
				"bsd3.0clauseopenmpi":                   "BSD-3-Clause-Open-MPI",
				"bsd3clause":                            "BSD-3-Clause",
				"bsd3clauseattribution":                 "BSD-3-Clause-Attribution",
				"bsd3clauseclear":                       "BSD-3-Clause-Clear",
				"bsd3clauselbnl":                        "BSD-3-Clause-LBNL",
				"bsd3clausemodification":                "BSD-3-Clause-Modification",
				"bsd3clausenomilitarylicense":           "BSD-3-Clause-No-Military-License",
				"bsd3clausenonuclearlicense":            "BSD-3-Clause-No-Nuclear-License",
				"bsd3clausenonuclearlicense2014":        "BSD-3-Clause-No-Nuclear-License-2014",
				"bsd3clausenonuclearwarranty":           "BSD-3-Clause-No-Nuclear-Warranty",
				"bsd3clauseopenmpi":                     "BSD-3-Clause-Open-MPI",
				"bsd4.0.0clause":                        "BSD-4-Clause",
				"bsd4.0.0clauseshortened":               "BSD-4-Clause-Shortened",
				"bsd4.0.0clauseuc":                      "BSD-4-Clause-UC",
				"bsd4.0clause":                          "BSD-4-Clause",
				"bsd4.0clauseshortened":                 "BSD-4-Clause-Shortened",
				"bsd4.0clauseuc":                        "BSD-4-Clause-UC",
				"bsd4.3.0reno":                          "BSD-4.3RENO",
				"bsd4.3.0tahoe":                         "BSD-4.3TAHOE",
				"bsd4.3reno":                            "BSD-4.3RENO",
				"bsd4.3tahoe":                           "BSD-4.3TAHOE",
				"bsd4clause":                            "BSD-4-Clause",
				"bsd4clauseshortened":                   "BSD-4-Clause-Shortened",
				"bsd4clauseuc":                          "BSD-4-Clause-UC",
				"bsd4reno":                              "BSD-4.3RENO",
				"bsd4tahoe":                             "BSD-4.3TAHOE",
				"bsdadvertisingacknowledgement":         "BSD-Advertising-Acknowledgement",
				"bsdattributionhpnddisclaimer":          "BSD-Attribution-HPND-disclaimer",
				"bsdprotection":                         "BSD-Protection",
				"bsdsourcecode":                         "BSD-Source-Code",
				"bsl1":                                  "BSL-1.0",
				"bsl1.0":                                "BSL-1.0",
				"bsl1.0.0":                              "BSL-1.0",
				"busl1":                                 "BUSL-1.1",
				"busl1.1":                               "BUSL-1.1",
				"busl1.1.0":                             "BUSL-1.1",
				"bzip21":                                "bzip2-1.0.6",
				"bzip21.0":                              "bzip2-1.0.6",
				"bzip21.0.5":                            "bzip2-1.0.6",
				"bzip21.0.6":                            "bzip2-1.0.6",
				"cal1":                                  "CAL-1.0",
				"cal1.0":                                "CAL-1.0",
				"cal1.0.0":                              "CAL-1.0",
				"cal1.0.0combinedworkexception":         "CAL-1.0-Combined-Work-Exception",
				"cal1.0combinedworkexception":           "CAL-1.0-Combined-Work-Exception",
				"cal1combinedworkexception":             "CAL-1.0-Combined-Work-Exception",
				"caldera":                               "Caldera",
				"catosl1":                               "CATOSL-1.1",
				"catosl1.1":                             "CATOSL-1.1",
				"catosl1.1.0":                           "CATOSL-1.1",
				"cc01":                                  "CC0-1.0",
				"cc01.0":                                "CC0-1.0",
				"cc01.0.0":                              "CC0-1.0",
				"ccby1":                                 "CC-BY-1.0",
				"ccby1.0":                               "CC-BY-1.0",
				"ccby1.0.0":                             "CC-BY-1.0",
				"ccby2":                                 "CC-BY-2.0",
				"ccby2.0":                               "CC-BY-2.0",
				"ccby2.0.0":                             "CC-BY-2.0",
				"ccby2.5":                               "CC-BY-2.5",
				"ccby2.5.0":                             "CC-BY-2.5",
				"ccby2.5.0au":                           "CC-BY-2.5-AU",
				"ccby2.5au":                             "CC-BY-2.5-AU",
				"ccby2au":                               "CC-BY-2.5-AU",
				"ccby3":                                 "CC-BY-3.0",
				"ccby3.0":                               "CC-BY-3.0",
				"ccby3.0.0":                             "CC-BY-3.0",
				"ccby3.0.0at":                           "CC-BY-3.0-AT",
				"ccby3.0.0de":                           "CC-BY-3.0-DE",
				"ccby3.0.0igo":                          "CC-BY-3.0-IGO",
				"ccby3.0.0nl":                           "CC-BY-3.0-NL",
				"ccby3.0.0us":                           "CC-BY-3.0-US",
				"ccby3.0at":                             "CC-BY-3.0-AT",
				"ccby3.0de":                             "CC-BY-3.0-DE",
				"ccby3.0igo":                            "CC-BY-3.0-IGO",
				"ccby3.0nl":                             "CC-BY-3.0-NL",
				"ccby3.0us":                             "CC-BY-3.0-US",
				"ccby3at":                               "CC-BY-3.0-AT",
				"ccby3de":                               "CC-BY-3.0-DE",
				"ccby3igo":                              "CC-BY-3.0-IGO",
				"ccby3nl":                               "CC-BY-3.0-NL",
				"ccby3us":                               "CC-BY-3.0-US",
				"ccby4":                                 "CC-BY-4.0",
				"ccby4.0":                               "CC-BY-4.0",
				"ccby4.0.0":                             "CC-BY-4.0",
				"ccbync1":                               "CC-BY-NC-1.0",
				"ccbync1.0":                             "CC-BY-NC-1.0",
				"ccbync1.0.0":                           "CC-BY-NC-1.0",
				"ccbync2":                               "CC-BY-NC-2.0",
				"ccbync2.0":                             "CC-BY-NC-2.0",
				"ccbync2.0.0":                           "CC-BY-NC-2.0",
				"ccbync2.5":                             "CC-BY-NC-2.5",
				"ccbync2.5.0":                           "CC-BY-NC-2.5",
				"ccbync3":                               "CC-BY-NC-3.0",
				"ccbync3.0":                             "CC-BY-NC-3.0",
				"ccbync3.0.0":                           "CC-BY-NC-3.0",
				"ccbync3.0.0de":                         "CC-BY-NC-3.0-DE",
				"ccbync3.0de":                           "CC-BY-NC-3.0-DE",
				"ccbync3de":                             "CC-BY-NC-3.0-DE",
				"ccbync4":                               "CC-BY-NC-4.0",
				"ccbync4.0":                             "CC-BY-NC-4.0",
				"ccbync4.0.0":                           "CC-BY-NC-4.0",
				"ccbyncnd1":                             "CC-BY-NC-ND-1.0",
				"ccbyncnd1.0":                           "CC-BY-NC-ND-1.0",
				"ccbyncnd1.0.0":                         "CC-BY-NC-ND-1.0",
				"ccbyncnd2":                             "CC-BY-NC-ND-2.0",
				"ccbyncnd2.0":                           "CC-BY-NC-ND-2.0",
				"ccbyncnd2.0.0":                         "CC-BY-NC-ND-2.0",
				"ccbyncnd2.5":                           "CC-BY-NC-ND-2.5",
				"ccbyncnd2.5.0":                         "CC-BY-NC-ND-2.5",
				"ccbyncnd3":                             "CC-BY-NC-ND-3.0",
				"ccbyncnd3.0":                           "CC-BY-NC-ND-3.0",
				"ccbyncnd3.0.0":                         "CC-BY-NC-ND-3.0",
				"ccbyncnd3.0.0de":                       "CC-BY-NC-ND-3.0-DE",
				"ccbyncnd3.0.0igo":                      "CC-BY-NC-ND-3.0-IGO",
				"ccbyncnd3.0de":                         "CC-BY-NC-ND-3.0-DE",
				"ccbyncnd3.0igo":                        "CC-BY-NC-ND-3.0-IGO",
				"ccbyncnd3de":                           "CC-BY-NC-ND-3.0-DE",
				"ccbyncnd3igo":                          "CC-BY-NC-ND-3.0-IGO",
				"ccbyncnd4":                             "CC-BY-NC-ND-4.0",
				"ccbyncnd4.0":                           "CC-BY-NC-ND-4.0",
				"ccbyncnd4.0.0":                         "CC-BY-NC-ND-4.0",
				"ccbyncsa1":                             "CC-BY-NC-SA-1.0",
				"ccbyncsa1.0":                           "CC-BY-NC-SA-1.0",
				"ccbyncsa1.0.0":                         "CC-BY-NC-SA-1.0",
				"ccbyncsa2":                             "CC-BY-NC-SA-2.0",
				"ccbyncsa2.0":                           "CC-BY-NC-SA-2.0",
				"ccbyncsa2.0.0":                         "CC-BY-NC-SA-2.0",
				"ccbyncsa2.0.0de":                       "CC-BY-NC-SA-2.0-DE",
				"ccbyncsa2.0.0fr":                       "CC-BY-NC-SA-2.0-FR",
				"ccbyncsa2.0.0uk":                       "CC-BY-NC-SA-2.0-UK",
				"ccbyncsa2.0de":                         "CC-BY-NC-SA-2.0-DE",
				"ccbyncsa2.0fr":                         "CC-BY-NC-SA-2.0-FR",
				"ccbyncsa2.0uk":                         "CC-BY-NC-SA-2.0-UK",
				"ccbyncsa2.5":                           "CC-BY-NC-SA-2.5",
				"ccbyncsa2.5.0":                         "CC-BY-NC-SA-2.5",
				"ccbyncsa2de":                           "CC-BY-NC-SA-2.0-DE",
				"ccbyncsa2fr":                           "CC-BY-NC-SA-2.0-FR",
				"ccbyncsa2uk":                           "CC-BY-NC-SA-2.0-UK",
				"ccbyncsa3":                             "CC-BY-NC-SA-3.0",
				"ccbyncsa3.0":                           "CC-BY-NC-SA-3.0",
				"ccbyncsa3.0.0":                         "CC-BY-NC-SA-3.0",
				"ccbyncsa3.0.0de":                       "CC-BY-NC-SA-3.0-DE",
				"ccbyncsa3.0.0igo":                      "CC-BY-NC-SA-3.0-IGO",
				"ccbyncsa3.0de":                         "CC-BY-NC-SA-3.0-DE",
				"ccbyncsa3.0igo":                        "CC-BY-NC-SA-3.0-IGO",
				"ccbyncsa3de":                           "CC-BY-NC-SA-3.0-DE",
				"ccbyncsa3igo":                          "CC-BY-NC-SA-3.0-IGO",
				"ccbyncsa4":                             "CC-BY-NC-SA-4.0",
				"ccbyncsa4.0":                           "CC-BY-NC-SA-4.0",
				"ccbyncsa4.0.0":                         "CC-BY-NC-SA-4.0",
				"ccbynd1":                               "CC-BY-ND-1.0",
				"ccbynd1.0":                             "CC-BY-ND-1.0",
				"ccbynd1.0.0":                           "CC-BY-ND-1.0",
				"ccbynd2":                               "CC-BY-ND-2.0",
				"ccbynd2.0":                             "CC-BY-ND-2.0",
				"ccbynd2.0.0":                           "CC-BY-ND-2.0",
				"ccbynd2.5":                             "CC-BY-ND-2.5",
				"ccbynd2.5.0":                           "CC-BY-ND-2.5",
				"ccbynd3":                               "CC-BY-ND-3.0",
				"ccbynd3.0":                             "CC-BY-ND-3.0",
				"ccbynd3.0.0":                           "CC-BY-ND-3.0",
				"ccbynd3.0.0de":                         "CC-BY-ND-3.0-DE",
				"ccbynd3.0de":                           "CC-BY-ND-3.0-DE",
				"ccbynd3de":                             "CC-BY-ND-3.0-DE",
				"ccbynd4":                               "CC-BY-ND-4.0",
				"ccbynd4.0":                             "CC-BY-ND-4.0",
				"ccbynd4.0.0":                           "CC-BY-ND-4.0",
				"ccbysa1":                               "CC-BY-SA-1.0",
				"ccbysa1.0":                             "CC-BY-SA-1.0",
				"ccbysa1.0.0":                           "CC-BY-SA-1.0",
				"ccbysa2":                               "CC-BY-SA-2.0",
				"ccbysa2.0":                             "CC-BY-SA-2.0",
				"ccbysa2.0.0":                           "CC-BY-SA-2.0",
				"ccbysa2.0.0uk":                         "CC-BY-SA-2.0-UK",
				"ccbysa2.0uk":                           "CC-BY-SA-2.0-UK",
				"ccbysa2.1.0jp":                         "CC-BY-SA-2.1-JP",
				"ccbysa2.1jp":                           "CC-BY-SA-2.1-JP",
				"ccbysa2.5":                             "CC-BY-SA-2.5",
				"ccbysa2.5.0":                           "CC-BY-SA-2.5",
				"ccbysa2jp":                             "CC-BY-SA-2.1-JP",
				"ccbysa2uk":                             "CC-BY-SA-2.0-UK",
				"ccbysa3":                               "CC-BY-SA-3.0",
				"ccbysa3.0":                             "CC-BY-SA-3.0",
				"ccbysa3.0.0":                           "CC-BY-SA-3.0",
				"ccbysa3.0.0at":                         "CC-BY-SA-3.0-AT",
				"ccbysa3.0.0de":                         "CC-BY-SA-3.0-DE",
				"ccbysa3.0at":                           "CC-BY-SA-3.0-AT",
				"ccbysa3.0de":                           "CC-BY-SA-3.0-DE",
				"ccbysa3at":                             "CC-BY-SA-3.0-AT",
				"ccbysa3de":                             "CC-BY-SA-3.0-DE",
				"ccbysa4":                               "CC-BY-SA-4.0",
				"ccbysa4.0":                             "CC-BY-SA-4.0",
				"ccbysa4.0.0":                           "CC-BY-SA-4.0",
				"ccpddc":                                "CC-PDDC",
				"cddl1":                                 "CDDL-1.0",
				"cddl1.0":                               "CDDL-1.0",
				"cddl1.0.0":                             "CDDL-1.0",
				"cddl1.1":                               "CDDL-1.1",
				"cddl1.1.0":                             "CDDL-1.1",
				"cdl1":                                  "CDL-1.0",
				"cdl1.0":                                "CDL-1.0",
				"cdl1.0.0":                              "CDL-1.0",
				"cdlapermissive1":                       "CDLA-Permissive-1.0",
				"cdlapermissive1.0":                     "CDLA-Permissive-1.0",
				"cdlapermissive1.0.0":                   "CDLA-Permissive-1.0",
				"cdlapermissive2":                       "CDLA-Permissive-2.0",
				"cdlapermissive2.0":                     "CDLA-Permissive-2.0",
				"cdlapermissive2.0.0":                   "CDLA-Permissive-2.0",
				"cdlasharing1":                          "CDLA-Sharing-1.0",
				"cdlasharing1.0":                        "CDLA-Sharing-1.0",
				"cdlasharing1.0.0":                      "CDLA-Sharing-1.0",
				"cecill1":                               "CECILL-1.0",
				"cecill1.0":                             "CECILL-1.0",
				"cecill1.0.0":                           "CECILL-1.0",
				"cecill1.1":                             "CECILL-1.1",
				"cecill1.1.0":                           "CECILL-1.1",
				"cecill2":                               "CECILL-2.0",
				"cecill2.0":                             "CECILL-2.0",
				"cecill2.0.0":                           "CECILL-2.0",
				"cecill2.1":                             "CECILL-2.1",
				"cecill2.1.0":                           "CECILL-2.1",
				"cecillb":                               "CECILL-B",
				"cecillc":                               "CECILL-C",
				"cernohl1":                              "CERN-OHL-1.1",
				"cernohl1.1":                            "CERN-OHL-1.1",
				"cernohl1.1.0":                          "CERN-OHL-1.1",
				"cernohl1.2":                            "CERN-OHL-1.2",
				"cernohl1.2.0":                          "CERN-OHL-1.2",
				"cernohlp2":                             "CERN-OHL-P-2.0",
				"cernohlp2.0":                           "CERN-OHL-P-2.0",
				"cernohlp2.0.0":                         "CERN-OHL-P-2.0",
				"cernohls2":                             "CERN-OHL-S-2.0",
				"cernohls2.0":                           "CERN-OHL-S-2.0",
				"cernohls2.0.0":                         "CERN-OHL-S-2.0",
				"cernohlw2":                             "CERN-OHL-W-2.0",
				"cernohlw2.0":                           "CERN-OHL-W-2.0",
				"cernohlw2.0.0":                         "CERN-OHL-W-2.0",
				"cfitsio":                               "CFITSIO",
				"checkmk":                               "checkmk",
				"clartistic":                            "ClArtistic",
				"clips":                                 "Clips",
				"cmumach":                               "CMU-Mach",
				"cnrijython":                            "CNRI-Jython",
				"cnripython":                            "CNRI-Python",
				"cnripythongplcompatible":               "CNRI-Python-GPL-Compatible",
				"coil1":                                 "COIL-1.0",
				"coil1.0":                               "COIL-1.0",
				"coil1.0.0":                             "COIL-1.0",
				"communityspec1":                        "Community-Spec-1.0",
				"communityspec1.0":                      "Community-Spec-1.0",
				"communityspec1.0.0":                    "Community-Spec-1.0",
				"condor1":                               "Condor-1.1",
				"condor1.1":                             "Condor-1.1",
				"condor1.1.0":                           "Condor-1.1",
				"copyleftnext0.3":                       "copyleft-next-0.3.0",
				"copyleftnext0.3.0":                     "copyleft-next-0.3.0",
				"copyleftnext0.3.1":                     "copyleft-next-0.3.1",
				"cornelllosslessjpeg":                   "Cornell-Lossless-JPEG",
				"cpal1":                                 "CPAL-1.0",
				"cpal1.0":                               "CPAL-1.0",
				"cpal1.0.0":                             "CPAL-1.0",
				"cpl1":                                  "CPL-1.0",
				"cpl1.0":                                "CPL-1.0",
				"cpl1.0.0":                              "CPL-1.0",
				"cpol1":                                 "CPOL-1.02",
				"cpol1.02":                              "CPOL-1.02",
				"cpol1.02.0":                            "CPOL-1.02",
				"crossword":                             "Crossword",
				"crystalstacker":                        "CrystalStacker",
				"cuaopl1":                               "CUA-OPL-1.0",
				"cuaopl1.0":                             "CUA-OPL-1.0",
				"cuaopl1.0.0":                           "CUA-OPL-1.0",
				"cube":                                  "Cube",
				"cuda1":                                 "C-UDA-1.0",
				"cuda1.0":                               "C-UDA-1.0",
				"cuda1.0.0":                             "C-UDA-1.0",
				"curl":                                  "curl",
				"dfsl1":                                 "D-FSL-1.0",
				"dfsl1.0":                               "D-FSL-1.0",
				"dfsl1.0.0":                             "D-FSL-1.0",
				"diffmark":                              "diffmark",
				"dldeby2":                               "DL-DE-BY-2.0",
				"dldeby2.0":                             "DL-DE-BY-2.0",
				"dldeby2.0.0":                           "DL-DE-BY-2.0",
				"doc":                                   "DOC",
				"dotseqn":                               "Dotseqn",
				"drl1":                                  "DRL-1.0",
				"drl1.0":                                "DRL-1.0",
				"drl1.0.0":                              "DRL-1.0",
				"dsdp":                                  "DSDP",
				"dvipdfm":                               "dvipdfm",
				"ecl1":                                  "ECL-1.0",
				"ecl1.0":                                "ECL-1.0",
				"ecl1.0.0":                              "ECL-1.0",
				"ecl2":                                  "ECL-2.0",
				"ecl2.0":                                "ECL-2.0",
				"ecl2.0.0":                              "ECL-2.0",
				"ecos2":                                 "eCos-2.0",
				"ecos2.0":                               "eCos-2.0",
				"ecos2.0.0":                             "eCos-2.0",
				"efl1":                                  "EFL-1.0",
				"efl1.0":                                "EFL-1.0",
				"efl1.0.0":                              "EFL-1.0",
				"efl2":                                  "EFL-2.0",
				"efl2.0":                                "EFL-2.0",
				"efl2.0.0":                              "EFL-2.0",
				"egenix":                                "eGenix",
				"elastic2":                              "Elastic-2.0",
				"elastic2.0":                            "Elastic-2.0",
				"elastic2.0.0":                          "Elastic-2.0",
				"entessa":                               "Entessa",
				"epics":                                 "EPICS",
				"epl1":                                  "EPL-1.0",
				"epl1.0":                                "EPL-1.0",
				"epl1.0.0":                              "EPL-1.0",
				"epl2":                                  "EPL-2.0",
				"epl2.0":                                "EPL-2.0",
				"epl2.0.0":                              "EPL-2.0",
				"erlpl1":                                "ErlPL-1.1",
				"erlpl1.1":                              "ErlPL-1.1",
				"erlpl1.1.0":                            "ErlPL-1.1",
				"etalab2":                               "etalab-2.0",
				"etalab2.0":                             "etalab-2.0",
				"etalab2.0.0":                           "etalab-2.0",
				"eudatagrid":                            "EUDatagrid",
				"eupl1":                                 "EUPL-1.0",
				"eupl1.0":                               "EUPL-1.0",
				"eupl1.0.0":                             "EUPL-1.0",
				"eupl1.1":                               "EUPL-1.1",
				"eupl1.1.0":                             "EUPL-1.1",
				"eupl1.2":                               "EUPL-1.2",
				"eupl1.2.0":                             "EUPL-1.2",
				"eurosym":                               "Eurosym",
				"fair":                                  "Fair",
				"fdkaac":                                "FDK-AAC",
				"frameworx1":                            "Frameworx-1.0",
				"frameworx1.0":                          "Frameworx-1.0",
				"frameworx1.0.0":                        "Frameworx-1.0",
				"freebsddoc":                            "FreeBSD-DOC",
				"freeimage":                             "FreeImage",
				"fsfap":                                 "FSFAP",
				"fsful":                                 "FSFUL",
				"fsfullr":                               "FSFULLR",
				"fsfullrwd":                             "FSFULLRWD",
				"ftl":                                   "FTL",
				"gd":                                    "GD",
				"gfdl1":                                 "GFDL-1.1-only",
				"gfdl1+":                                "GFDL-1.1-or-later",
				"gfdl1+invariants":                      "GFDL-1.1-invariants-or-later",
				"gfdl1+noinvariants":                    "GFDL-1.1-no-invariants-or-later",
				"gfdl1.1":                               "GFDL-1.1-only",
				"gfdl1.1+":                              "GFDL-1.1-or-later",
				"gfdl1.1+invariants":                    "GFDL-1.1-invariants-or-later",
				"gfdl1.1+noinvariants":                  "GFDL-1.1-no-invariants-or-later",
				"gfdl1.1.0":                             "GFDL-1.1-only",
				"gfdl1.1.0+":                            "GFDL-1.1-or-later",
				"gfdl1.1.0+invariants":                  "GFDL-1.1-invariants-or-later",
				"gfdl1.1.0+noinvariants":                "GFDL-1.1-no-invariants-or-later",
				"gfdl1.1.0invariantsonly":               "GFDL-1.1-invariants-only",
				"gfdl1.1.0invariantsorlater":            "GFDL-1.1-invariants-or-later",
				"gfdl1.1.0noinvariantsonly":             "GFDL-1.1-no-invariants-only",
				"gfdl1.1.0noinvariantsorlater":          "GFDL-1.1-no-invariants-or-later",
				"gfdl1.1.0only":                         "GFDL-1.1-only",
				"gfdl1.1.0orlater":                      "GFDL-1.1-or-later",
				"gfdl1.1invariantsonly":                 "GFDL-1.1-invariants-only",
				"gfdl1.1invariantsorlater":              "GFDL-1.1-invariants-or-later",
				"gfdl1.1noinvariantsonly":               "GFDL-1.1-no-invariants-only",
				"gfdl1.1noinvariantsorlater":            "GFDL-1.1-no-invariants-or-later",
				"gfdl1.1only":                           "GFDL-1.1-only",
				"gfdl1.1orlater":                        "GFDL-1.1-or-later",
				"gfdl1.2":                               "GFDL-1.2-only",
				"gfdl1.2+":                              "GFDL-1.2-or-later",
				"gfdl1.2+invariants":                    "GFDL-1.2-invariants-or-later",
				"gfdl1.2+noinvariants":                  "GFDL-1.2-no-invariants-or-later",
				"gfdl1.2.0":                             "GFDL-1.2-only",
				"gfdl1.2.0+":                            "GFDL-1.2-or-later",
				"gfdl1.2.0+invariants":                  "GFDL-1.2-invariants-or-later",
				"gfdl1.2.0+noinvariants":                "GFDL-1.2-no-invariants-or-later",
				"gfdl1.2.0invariantsonly":               "GFDL-1.2-invariants-only",
				"gfdl1.2.0invariantsorlater":            "GFDL-1.2-invariants-or-later",
				"gfdl1.2.0noinvariantsonly":             "GFDL-1.2-no-invariants-only",
				"gfdl1.2.0noinvariantsorlater":          "GFDL-1.2-no-invariants-or-later",
				"gfdl1.2.0only":                         "GFDL-1.2-only",
				"gfdl1.2.0orlater":                      "GFDL-1.2-or-later",
				"gfdl1.2invariantsonly":                 "GFDL-1.2-invariants-only",
				"gfdl1.2invariantsorlater":              "GFDL-1.2-invariants-or-later",
				"gfdl1.2noinvariantsonly":               "GFDL-1.2-no-invariants-only",
				"gfdl1.2noinvariantsorlater":            "GFDL-1.2-no-invariants-or-later",
				"gfdl1.2only":                           "GFDL-1.2-only",
				"gfdl1.2orlater":                        "GFDL-1.2-or-later",
				"gfdl1.3":                               "GFDL-1.3-only",
				"gfdl1.3+":                              "GFDL-1.3-or-later",
				"gfdl1.3+invariants":                    "GFDL-1.3-invariants-or-later",
				"gfdl1.3+noinvariants":                  "GFDL-1.3-no-invariants-or-later",
				"gfdl1.3.0":                             "GFDL-1.3-only",
				"gfdl1.3.0+":                            "GFDL-1.3-or-later",
				"gfdl1.3.0+invariants":                  "GFDL-1.3-invariants-or-later",
				"gfdl1.3.0+noinvariants":                "GFDL-1.3-no-invariants-or-later",
				"gfdl1.3.0invariantsonly":               "GFDL-1.3-invariants-only",
				"gfdl1.3.0invariantsorlater":            "GFDL-1.3-invariants-or-later",
				"gfdl1.3.0noinvariantsonly":             "GFDL-1.3-no-invariants-only",
				"gfdl1.3.0noinvariantsorlater":          "GFDL-1.3-no-invariants-or-later",
				"gfdl1.3.0only":                         "GFDL-1.3-only",
				"gfdl1.3.0orlater":                      "GFDL-1.3-or-later",
				"gfdl1.3invariantsonly":                 "GFDL-1.3-invariants-only",
				"gfdl1.3invariantsorlater":              "GFDL-1.3-invariants-or-later",
				"gfdl1.3noinvariantsonly":               "GFDL-1.3-no-invariants-only",
				"gfdl1.3noinvariantsorlater":            "GFDL-1.3-no-invariants-or-later",
				"gfdl1.3only":                           "GFDL-1.3-only",
				"gfdl1.3orlater":                        "GFDL-1.3-or-later",
				"gfdl1invariantsonly":                   "GFDL-1.1-invariants-only",
				"gfdl1invariantsorlater":                "GFDL-1.1-invariants-or-later",
				"gfdl1noinvariantsonly":                 "GFDL-1.1-no-invariants-only",
				"gfdl1noinvariantsorlater":              "GFDL-1.1-no-invariants-or-later",
				"gfdl1only":                             "GFDL-1.1-only",
				"gfdl1orlater":                          "GFDL-1.1-or-later",
				"giftware":                              "Giftware",
				"gl2.0.0ps":                             "GL2PS",
				"gl2.0ps":                               "GL2PS",
				"gl2ps":                                 "GL2PS",
				"glide":                                 "Glide",
				"glulxe":                                "Glulxe",
				"glwtpl":                                "GLWTPL",
				"gnuplot":                               "gnuplot",
				"gpl1":                                  "GPL-1.0-only",
				"gpl1+":                                 "GPL-1.0-or-later",
				"gpl1.0":                                "GPL-1.0-only",
				"gpl1.0+":                               "GPL-1.0-or-later",
				"gpl1.0.0":                              "GPL-1.0-only",
				"gpl1.0.0+":                             "GPL-1.0-or-later",
				"gpl1.0.0only":                          "GPL-1.0-only",
				"gpl1.0.0orlater":                       "GPL-1.0-or-later",
				"gpl1.0only":                            "GPL-1.0-only",
				"gpl1.0orlater":                         "GPL-1.0-or-later",
				"gpl1only":                              "GPL-1.0-only",
				"gpl1orlater":                           "GPL-1.0-or-later",
				"gpl2":                                  "GPL-2.0-only",
				"gpl2+":                                 "GPL-2.0-or-later",
				"gpl2.0":                                "GPL-2.0-only",
				"gpl2.0+":                               "GPL-2.0-or-later",
				"gpl2.0.0":                              "GPL-2.0-only",
				"gpl2.0.0+":                             "GPL-2.0-or-later",
				"gpl2.0.0only":                          "GPL-2.0-only",
				"gpl2.0.0orlater":                       "GPL-2.0-or-later",
				"gpl2.0.0withautoconfexception":         "GPL-2.0-with-autoconf-exception",
				"gpl2.0.0withbisonexception":            "GPL-2.0-with-bison-exception",
				"gpl2.0.0withclasspathexception":        "GPL-2.0-with-classpath-exception",
				"gpl2.0.0withfontexception":             "GPL-2.0-with-font-exception",
				"gpl2.0.0withgccexception":              "GPL-2.0-with-GCC-exception",
				"gpl2.0only":                            "GPL-2.0-only",
				"gpl2.0orlater":                         "GPL-2.0-or-later",
				"gpl2.0withautoconfexception":           "GPL-2.0-with-autoconf-exception",
				"gpl2.0withbisonexception":              "GPL-2.0-with-bison-exception",
				"gpl2.0withclasspathexception":          "GPL-2.0-with-classpath-exception",
				"gpl2.0withfontexception":               "GPL-2.0-with-font-exception",
				"gpl2.0withgccexception":                "GPL-2.0-with-GCC-exception",
				"gpl2only":                              "GPL-2.0-only",
				"gpl2orlater":                           "GPL-2.0-or-later",
				"gpl2withautoconfexception":             "GPL-2.0-with-autoconf-exception",
				"gpl2withbisonexception":                "GPL-2.0-with-bison-exception",
				"gpl2withclasspathexception":            "GPL-2.0-with-classpath-exception",
				"gpl2withfontexception":                 "GPL-2.0-with-font-exception",
				"gpl2withgccexception":                  "GPL-2.0-with-GCC-exception",
				"gpl3":                                  "GPL-3.0-only",
				"gpl3+":                                 "GPL-3.0-or-later",
				"gpl3.0":                                "GPL-3.0-only",
				"gpl3.0+":                               "GPL-3.0-or-later",
				"gpl3.0.0":                              "GPL-3.0-only",
				"gpl3.0.0+":                             "GPL-3.0-or-later",
				"gpl3.0.0only":                          "GPL-3.0-only",
				"gpl3.0.0orlater":                       "GPL-3.0-or-later",
				"gpl3.0.0withautoconfexception":         "GPL-3.0-with-autoconf-exception",
				"gpl3.0.0withgccexception":              "GPL-3.0-with-GCC-exception",
				"gpl3.0only":                            "GPL-3.0-only",
				"gpl3.0orlater":                         "GPL-3.0-or-later",
				"gpl3.0withautoconfexception":           "GPL-3.0-with-autoconf-exception",
				"gpl3.0withgccexception":                "GPL-3.0-with-GCC-exception",
				"gpl3only":                              "GPL-3.0-only",
				"gpl3orlater":                           "GPL-3.0-or-later",
				"gpl3withautoconfexception":             "GPL-3.0-with-autoconf-exception",
				"gpl3withgccexception":                  "GPL-3.0-with-GCC-exception",
				"graphicsgems":                          "Graphics-Gems",
				"gsoap1.3.0b":                           "gSOAP-1.3b",
				"gsoap1.3b":                             "gSOAP-1.3b",
				"gsoap1b":                               "gSOAP-1.3b",
				"haskellreport":                         "HaskellReport",
				"hippocratic2":                          "Hippocratic-2.1",
				"hippocratic2.1":                        "Hippocratic-2.1",
				"hippocratic2.1.0":                      "Hippocratic-2.1",
				"hp1986":                                "HP-1986",
				"hp1986.0":                              "HP-1986",
				"hp1986.0.0":                            "HP-1986",
				"hpnd":                                  "HPND",
				"hpndexportus":                          "HPND-export-US",
				"hpndmarkuskuhn":                        "HPND-Markus-Kuhn",
				"hpndsellvariant":                       "HPND-sell-variant",
				"hpndsellvariantmitdisclaimer":          "HPND-sell-variant-MIT-disclaimer",
				"htmltidy":                              "HTMLTIDY",
				"ibmpibs":                               "IBM-pibs",
				"icu":                                   "ICU",
				"ieccodecomponentseula":                 "IEC-Code-Components-EULA",
				"ijg":                                   "IJG",
				"ijgshort":                              "IJG-short",
				"imagemagick":                           "ImageMagick",
				"imatix":                                "iMatix",
				"imlib2":                                "Imlib2",
				"imlib2.0":                              "Imlib2",
				"imlib2.0.0":                            "Imlib2",
				"infozip":                               "Info-ZIP",
				"intel":                                 "Intel",
				"intelacpi":                             "Intel-ACPI",
				"interbase1":                            "Interbase-1.0",
				"interbase1.0":                          "Interbase-1.0",
				"interbase1.0.0":                        "Interbase-1.0",
				"ipa":                                   "IPA",
				"ipl1":                                  "IPL-1.0",
				"ipl1.0":                                "IPL-1.0",
				"ipl1.0.0":                              "IPL-1.0",
				"isc":                                   "ISC",
				"jam":                                   "Jam",
				"jasper2":                               "JasPer-2.0",
				"jasper2.0":                             "JasPer-2.0",
				"jasper2.0.0":                           "JasPer-2.0",
				"jplimage":                              "JPL-image",
				"jpnic":                                 "JPNIC",
				"json":                                  "JSON",
				"kazlib":                                "Kazlib",
				"knuthctan":                             "Knuth-CTAN",
				"lal1":                                  "LAL-1.2",
				"lal1.2":                                "LAL-1.2",
				"lal1.2.0":                              "LAL-1.2",
				"lal1.3":                                "LAL-1.3",
				"lal1.3.0":                              "LAL-1.3",
				"latex2.0.0e":                           "Latex2e",
				"latex2.0e":                             "Latex2e",
				"latex2e":                               "Latex2e",
				"leptonica":                             "Leptonica",
				"lgpl2":                                 "LGPL-2.0-only",
				"lgpl2+":                                "LGPL-2.0-or-later",
				"lgpl2.0":                               "LGPL-2.0-only",
				"lgpl2.0+":                              "LGPL-2.0-or-later",
				"lgpl2.0.0":                             "LGPL-2.0-only",
				"lgpl2.0.0+":                            "LGPL-2.0-or-later",
				"lgpl2.0.0only":                         "LGPL-2.0-only",
				"lgpl2.0.0orlater":                      "LGPL-2.0-or-later",
				"lgpl2.0only":                           "LGPL-2.0-only",
				"lgpl2.0orlater":                        "LGPL-2.0-or-later",
				"lgpl2.1":                               "LGPL-2.1-only",
				"lgpl2.1+":                              "LGPL-2.1-or-later",
				"lgpl2.1.0":                             "LGPL-2.1-only",
				"lgpl2.1.0+":                            "LGPL-2.1-or-later",
				"lgpl2.1.0only":                         "LGPL-2.1-only",
				"lgpl2.1.0orlater":                      "LGPL-2.1-or-later",
				"lgpl2.1only":                           "LGPL-2.1-only",
				"lgpl2.1orlater":                        "LGPL-2.1-or-later",
				"lgpl2only":                             "LGPL-2.0-only",
				"lgpl2orlater":                          "LGPL-2.0-or-later",
				"lgpl3":                                 "LGPL-3.0-only",
				"lgpl3+":                                "LGPL-3.0-or-later",
				"lgpl3.0":                               "LGPL-3.0-only",
				"lgpl3.0+":                              "LGPL-3.0-or-later",
				"lgpl3.0.0":                             "LGPL-3.0-only",
				"lgpl3.0.0+":                            "LGPL-3.0-or-later",
				"lgpl3.0.0only":                         "LGPL-3.0-only",
				"lgpl3.0.0orlater":                      "LGPL-3.0-or-later",
				"lgpl3.0only":                           "LGPL-3.0-only",
				"lgpl3.0orlater":                        "LGPL-3.0-or-later",
				"lgpl3only":                             "LGPL-3.0-only",
				"lgpl3orlater":                          "LGPL-3.0-or-later",
				"lgpllr":                                "LGPLLR",
				"libpng":                                "Libpng",
				"libpng2":                               "libpng-2.0",
				"libpng2.0":                             "libpng-2.0",
				"libpng2.0.0":                           "libpng-2.0",
				"libselinux1":                           "libselinux-1.0",
				"libselinux1.0":                         "libselinux-1.0",
				"libselinux1.0.0":                       "libselinux-1.0",
				"libtiff":                               "libtiff",
				"libutildavidnugent":                    "libutil-David-Nugent",
				"liliqp1":                               "LiLiQ-P-1.1",
				"liliqp1.1":                             "LiLiQ-P-1.1",
				"liliqp1.1.0":                           "LiLiQ-P-1.1",
				"liliqr1":                               "LiLiQ-R-1.1",
				"liliqr1.1":                             "LiLiQ-R-1.1",
				"liliqr1.1.0":                           "LiLiQ-R-1.1",
				"liliqrplus1":                           "LiLiQ-Rplus-1.1",
				"liliqrplus1.1":                         "LiLiQ-Rplus-1.1",
				"liliqrplus1.1.0":                       "LiLiQ-Rplus-1.1",
				"linuxmanpagescopyleft":                 "Linux-man-pages-copyleft",
				"linuxopenib":                           "Linux-OpenIB",
				"loop":                                  "LOOP",
				"lpl1":                                  "LPL-1.0",
				"lpl1.0":                                "LPL-1.0",
				"lpl1.0.0":                              "LPL-1.0",
				"lpl1.02":                               "LPL-1.02",
				"lpl1.02.0":                             "LPL-1.02",
				"lppl1":                                 "LPPL-1.0",
				"lppl1.0":                               "LPPL-1.0",
				"lppl1.0.0":                             "LPPL-1.0",
				"lppl1.1":                               "LPPL-1.1",
				"lppl1.1.0":                             "LPPL-1.1",
				"lppl1.2":                               "LPPL-1.2",
				"lppl1.2.0":                             "LPPL-1.2",
				"lppl1.3.0a":                            "LPPL-1.3a",
				"lppl1.3.0c":                            "LPPL-1.3c",
				"lppl1.3a":                              "LPPL-1.3a",
				"lppl1.3c":                              "LPPL-1.3c",
				"lppl1a":                                "LPPL-1.3a",
				"lppl1c":                                "LPPL-1.3c",
				"lzmasdk9":                              "LZMA-SDK-9.22",
				"lzmasdk9.11.0to9.20":                   "LZMA-SDK-9.11-to-9.20",
				"lzmasdk9.11to9.20":                     "LZMA-SDK-9.11-to-9.20",
				"lzmasdk9.22":                           "LZMA-SDK-9.22",
				"lzmasdk9.22.0":                         "LZMA-SDK-9.22",
				"lzmasdk9to9.20":                        "LZMA-SDK-9.11-to-9.20",
				"makeindex":                             "MakeIndex",
				"martinbirgmeier":                       "Martin-Birgmeier",
				"minpack":                               "Minpack",
				"miros":                                 "MirOS",
				"mit":                                   "MIT",
				"mit0":                                  "MIT-0",
				"mitadvertising":                        "MIT-advertising",
				"mitcmu":                                "MIT-CMU",
				"mitenna":                               "MIT-enna",
				"mitfeh":                                "MIT-feh",
				"mitmodernvariant":                      "MIT-Modern-Variant",
				"mitnfa":                                "MITNFA",
				"mitopengroup":                          "MIT-open-group",
				"mitwu":                                 "MIT-Wu",
				"motosoto":                              "Motosoto",
				"mpich2":                                "mpich2",
				"mpich2.0":                              "mpich2",
				"mpich2.0.0":                            "mpich2",
				"mpipermissive":                         "mpi-permissive",
				"mpl1":                                  "MPL-1.0",
				"mpl1.0":                                "MPL-1.0",
				"mpl1.0.0":                              "MPL-1.0",
				"mpl1.1":                                "MPL-1.1",
				"mpl1.1.0":                              "MPL-1.1",
				"mpl2":                                  "MPL-2.0",
				"mpl2.0":                                "MPL-2.0",
				"mpl2.0.0":                              "MPL-2.0",
				"mpl2.0.0nocopyleftexception":           "MPL-2.0-no-copyleft-exception",
				"mpl2.0nocopyleftexception":             "MPL-2.0-no-copyleft-exception",
				"mpl2nocopyleftexception":               "MPL-2.0-no-copyleft-exception",
				"mplus":                                 "mplus",
				"mslpl":                                 "MS-LPL",
				"mspl":                                  "MS-PL",
				"msrl":                                  "MS-RL",
				"mtll":                                  "MTLL",
				"mulanpsl1":                             "MulanPSL-1.0",
				"mulanpsl1.0":                           "MulanPSL-1.0",
				"mulanpsl1.0.0":                         "MulanPSL-1.0",
				"mulanpsl2":                             "MulanPSL-2.0",
				"mulanpsl2.0":                           "MulanPSL-2.0",
				"mulanpsl2.0.0":                         "MulanPSL-2.0",
				"multics":                               "Multics",
				"mup":                                   "Mup",
				"naist2003":                             "NAIST-2003",
				"naist2003.0":                           "NAIST-2003",
				"naist2003.0.0":                         "NAIST-2003",
				"nasa1":                                 "NASA-1.3",
				"nasa1.3":                               "NASA-1.3",
				"nasa1.3.0":                             "NASA-1.3",
				"naumen":                                "Naumen",
				"nbpl1":                                 "NBPL-1.0",
				"nbpl1.0":                               "NBPL-1.0",
				"nbpl1.0.0":                             "NBPL-1.0",
				"ncgluk2":                               "NCGL-UK-2.0",
				"ncgluk2.0":                             "NCGL-UK-2.0",
				"ncgluk2.0.0":                           "NCGL-UK-2.0",
				"ncsa":                                  "NCSA",
				"netcdf":                                "NetCDF",
				"netsnmp":                               "Net-SNMP",
				"newsletr":                              "Newsletr",
				"ngpl":                                  "NGPL",
				"nicta1":                                "NICTA-1.0",
				"nicta1.0":                              "NICTA-1.0",
				"nicta1.0.0":                            "NICTA-1.0",
				"nistpd":                                "NIST-PD",
				"nistpdfallback":                        "NIST-PD-fallback",
				"nlod1":                                 "NLOD-1.0",
				"nlod1.0":                               "NLOD-1.0",
				"nlod1.0.0":                             "NLOD-1.0",
				"nlod2":                                 "NLOD-2.0",
				"nlod2.0":                               "NLOD-2.0",
				"nlod2.0.0":                             "NLOD-2.0",
				"nlpl":                                  "NLPL",
				"nokia":                                 "Nokia",
				"nosl":                                  "NOSL",
				"noweb":                                 "Noweb",
				"npl1":                                  "NPL-1.0",
				"npl1.0":                                "NPL-1.0",
				"npl1.0.0":                              "NPL-1.0",
				"npl1.1":                                "NPL-1.1",
				"npl1.1.0":                              "NPL-1.1",
				"nposl3":                                "NPOSL-3.0",
				"nposl3.0":                              "NPOSL-3.0",
				"nposl3.0.0":                            "NPOSL-3.0",
				"nrl":                                   "NRL",
				"ntp":                                   "NTP",
				"ntp0":                                  "NTP-0",
				"nunit":                                 "Nunit",
				"occtpl":                                "OCCT-PL",
				"oclc2":                                 "OCLC-2.0",
				"oclc2.0":                               "OCLC-2.0",
				"oclc2.0.0":                             "OCLC-2.0",
				"odbl1":                                 "ODbL-1.0",
				"odbl1.0":                               "ODbL-1.0",
				"odbl1.0.0":                             "ODbL-1.0",
				"odcby1":                                "ODC-By-1.0",
				"odcby1.0":                              "ODC-By-1.0",
				"odcby1.0.0":                            "ODC-By-1.0",
				"offis":                                 "OFFIS",
				"ofl1":                                  "OFL-1.0",
				"ofl1.0":                                "OFL-1.0",
				"ofl1.0.0":                              "OFL-1.0",
				"ofl1.0.0norfn":                         "OFL-1.0-no-RFN",
				"ofl1.0.0rfn":                           "OFL-1.0-RFN",
				"ofl1.0norfn":                           "OFL-1.0-no-RFN",
				"ofl1.0rfn":                             "OFL-1.0-RFN",
				"ofl1.1":                                "OFL-1.1",
				"ofl1.1.0":                              "OFL-1.1",
				"ofl1.1.0norfn":                         "OFL-1.1-no-RFN",
				"ofl1.1.0rfn":                           "OFL-1.1-RFN",
				"ofl1.1norfn":                           "OFL-1.1-no-RFN",
				"ofl1.1rfn":                             "OFL-1.1-RFN",
				"ofl1norfn":                             "OFL-1.0-no-RFN",
				"ofl1rfn":                               "OFL-1.0-RFN",
				"ogc1":                                  "OGC-1.0",
				"ogc1.0":                                "OGC-1.0",
				"ogc1.0.0":                              "OGC-1.0",
				"ogdltaiwan1":                           "OGDL-Taiwan-1.0",
				"ogdltaiwan1.0":                         "OGDL-Taiwan-1.0",
				"ogdltaiwan1.0.0":                       "OGDL-Taiwan-1.0",
				"oglcanada2":                            "OGL-Canada-2.0",
				"oglcanada2.0":                          "OGL-Canada-2.0",
				"oglcanada2.0.0":                        "OGL-Canada-2.0",
				"ogluk1":                                "OGL-UK-1.0",
				"ogluk1.0":                              "OGL-UK-1.0",
				"ogluk1.0.0":                            "OGL-UK-1.0",
				"ogluk2":                                "OGL-UK-2.0",
				"ogluk2.0":                              "OGL-UK-2.0",
				"ogluk2.0.0":                            "OGL-UK-2.0",
				"ogluk3":                                "OGL-UK-3.0",
				"ogluk3.0":                              "OGL-UK-3.0",
				"ogluk3.0.0":                            "OGL-UK-3.0",
				"ogtsl":                                 "OGTSL",
				"oldap1":                                "OLDAP-1.1",
				"oldap1.1":                              "OLDAP-1.1",
				"oldap1.1.0":                            "OLDAP-1.1",
				"oldap1.2":                              "OLDAP-1.2",
				"oldap1.2.0":                            "OLDAP-1.2",
				"oldap1.3":                              "OLDAP-1.3",
				"oldap1.3.0":                            "OLDAP-1.3",
				"oldap1.4":                              "OLDAP-1.4",
				"oldap1.4.0":                            "OLDAP-1.4",
				"oldap2":                                "OLDAP-2.0",
				"oldap2.0":                              "OLDAP-2.0",
				"oldap2.0.0":                            "OLDAP-2.0",
				"oldap2.0.1":                            "OLDAP-2.0.1",
				"oldap2.1":                              "OLDAP-2.1",
				"oldap2.1.0":                            "OLDAP-2.1",
				"oldap2.2":                              "OLDAP-2.2",
				"oldap2.2.0":                            "OLDAP-2.2",
				"oldap2.2.1":                            "OLDAP-2.2.1",
				"oldap2.2.2":                            "OLDAP-2.2.2",
				"oldap2.3":                              "OLDAP-2.3",
				"oldap2.3.0":                            "OLDAP-2.3",
				"oldap2.4":                              "OLDAP-2.4",
				"oldap2.4.0":                            "OLDAP-2.4",
				"oldap2.5":                              "OLDAP-2.5",
				"oldap2.5.0":                            "OLDAP-2.5",
				"oldap2.6":                              "OLDAP-2.6",
				"oldap2.6.0":                            "OLDAP-2.6",
				"oldap2.7":                              "OLDAP-2.7",
				"oldap2.7.0":                            "OLDAP-2.7",
				"oldap2.8":                              "OLDAP-2.8",
				"oldap2.8.0":                            "OLDAP-2.8",
				"oml":                                   "OML",
				"openpbs2":                              "OpenPBS-2.3",
				"openpbs2.3":                            "OpenPBS-2.3",
				"openpbs2.3.0":                          "OpenPBS-2.3",
				"openssl":                               "OpenSSL",
				"opl1":                                  "OPL-1.0",
				"opl1.0":                                "OPL-1.0",
				"opl1.0.0":                              "OPL-1.0",
				"opubl1":                                "OPUBL-1.0",
				"opubl1.0":                              "OPUBL-1.0",
				"opubl1.0.0":                            "OPUBL-1.0",
				"osetpl2":                               "OSET-PL-2.1",
				"osetpl2.1":                             "OSET-PL-2.1",
				"osetpl2.1.0":                           "OSET-PL-2.1",
				"osl1":                                  "OSL-1.0",
				"osl1.0":                                "OSL-1.0",
				"osl1.0.0":                              "OSL-1.0",
				"osl1.1":                                "OSL-1.1",
				"osl1.1.0":                              "OSL-1.1",
				"osl2":                                  "OSL-2.0",
				"osl2.0":                                "OSL-2.0",
				"osl2.0.0":                              "OSL-2.0",
				"osl2.1":                                "OSL-2.1",
				"osl2.1.0":                              "OSL-2.1",
				"osl3":                                  "OSL-3.0",
				"osl3.0":                                "OSL-3.0",
				"osl3.0.0":                              "OSL-3.0",
				"ouda1":                                 "O-UDA-1.0",
				"ouda1.0":                               "O-UDA-1.0",
				"ouda1.0.0":                             "O-UDA-1.0",
				"parity6":                               "Parity-6.0.0",
				"parity6.0":                             "Parity-6.0.0",
				"parity6.0.0":                           "Parity-6.0.0",
				"parity7":                               "Parity-7.0.0",
				"parity7.0":                             "Parity-7.0.0",
				"parity7.0.0":                           "Parity-7.0.0",
				"pddl1":                                 "PDDL-1.0",
				"pddl1.0":                               "PDDL-1.0",
				"pddl1.0.0":                             "PDDL-1.0",
				"php3":                                  "PHP-3.0",
				"php3.0":                                "PHP-3.0",
				"php3.0.0":                              "PHP-3.0",
				"php3.01":                               "PHP-3.01",
				"php3.01.0":                             "PHP-3.01",
				"plexus":                                "Plexus",
				"polyformnoncommercial1":                "PolyForm-Noncommercial-1.0.0",
				"polyformnoncommercial1.0":              "PolyForm-Noncommercial-1.0.0",
				"polyformnoncommercial1.0.0":            "PolyForm-Noncommercial-1.0.0",
				"polyformsmallbusiness1":                "PolyForm-Small-Business-1.0.0",
				"polyformsmallbusiness1.0":              "PolyForm-Small-Business-1.0.0",
				"polyformsmallbusiness1.0.0":            "PolyForm-Small-Business-1.0.0",
				"postgresql":                            "PostgreSQL",
				"psf2":                                  "PSF-2.0",
				"psf2.0":                                "PSF-2.0",
				"psf2.0.0":                              "PSF-2.0",
				"psfrag":                                "psfrag",
				"psutils":                               "psutils",
				"python2":                               "Python-2.0",
				"python2.0":                             "Python-2.0",
				"python2.0.0":                           "Python-2.0",
				"python2.0.1":                           "Python-2.0.1",
				"qhull":                                 "Qhull",
				"qpl1":                                  "QPL-1.0",
				"qpl1.0":                                "QPL-1.0",
				"qpl1.0.0":                              "QPL-1.0",
				"qpl1.0.0inria2004":                     "QPL-1.0-INRIA-2004",
				"qpl1.0inria2004":                       "QPL-1.0-INRIA-2004",
				"qpl1inria2004":                         "QPL-1.0-INRIA-2004",
				"rdisc":                                 "Rdisc",
				"rhecos1":                               "RHeCos-1.1",
				"rhecos1.1":                             "RHeCos-1.1",
				"rhecos1.1.0":                           "RHeCos-1.1",
				"rpl1":                                  "RPL-1.1",
				"rpl1.1":                                "RPL-1.1",
				"rpl1.1.0":                              "RPL-1.1",
				"rpl1.5":                                "RPL-1.5",
				"rpl1.5.0":                              "RPL-1.5",
				"rpsl1":                                 "RPSL-1.0",
				"rpsl1.0":                               "RPSL-1.0",
				"rpsl1.0.0":                             "RPSL-1.0",
				"rsamd":                                 "RSA-MD",
				"rscpl":                                 "RSCPL",
				"ruby":                                  "Ruby",
				"saxpath":                               "Saxpath",
				"saxpd":                                 "SAX-PD",
				"scea":                                  "SCEA",
				"schemereport":                          "SchemeReport",
				"sendmail":                              "Sendmail",
				"sendmail8":                             "Sendmail-8.23",
				"sendmail8.23":                          "Sendmail-8.23",
				"sendmail8.23.0":                        "Sendmail-8.23",
				"sgib1":                                 "SGI-B-1.0",
				"sgib1.0":                               "SGI-B-1.0",
				"sgib1.0.0":                             "SGI-B-1.0",
				"sgib1.1":                               "SGI-B-1.1",
				"sgib1.1.0":                             "SGI-B-1.1",
				"sgib2":                                 "SGI-B-2.0",
				"sgib2.0":                               "SGI-B-2.0",
				"sgib2.0.0":                             "SGI-B-2.0",
				"shl0.5":                                "SHL-0.5",
				"shl0.5.0":                              "SHL-0.5",
				"shl0.51":                               "SHL-0.51",
				"shl0.51.0":                             "SHL-0.51",
				"simpl2":                                "SimPL-2.0",
				"simpl2.0":                              "SimPL-2.0",
				"simpl2.0.0":                            "SimPL-2.0",
				"sissl":                                 "SISSL",
				"sissl1":                                "SISSL-1.2",
				"sissl1.2":                              "SISSL-1.2",
				"sissl1.2.0":                            "SISSL-1.2",
				"sleepycat":                             "Sleepycat",
				"smlnj":                                 "SMLNJ",
				"smppl":                                 "SMPPL",
				"snia":                                  "SNIA",
				"snprintf":                              "snprintf",
				"spencer86":                             "Spencer-86",
				"spencer86.0":                           "Spencer-86",
				"spencer86.0.0":                         "Spencer-86",
				"spencer94":                             "Spencer-94",
				"spencer94.0":                           "Spencer-94",
				"spencer94.0.0":                         "Spencer-94",
				"spencer99":                             "Spencer-99",
				"spencer99.0":                           "Spencer-99",
				"spencer99.0.0":                         "Spencer-99",
				"spl1":                                  "SPL-1.0",
				"spl1.0":                                "SPL-1.0",
				"spl1.0.0":                              "SPL-1.0",
				"sshopenssh":                            "SSH-OpenSSH",
				"sshshort":                              "SSH-short",
				"sspl1":                                 "SSPL-1.0",
				"sspl1.0":                               "SSPL-1.0",
				"sspl1.0.0":                             "SSPL-1.0",
				"standardmlnj":                          "SMLNJ",
				"sugarcrm1":                             "SugarCRM-1.1.3",
				"sugarcrm1.1":                           "SugarCRM-1.1.3",
				"sugarcrm1.1.3":                         "SugarCRM-1.1.3",
				"sunpro":                                "SunPro",
				"swl":                                   "SWL",
				"symlinks":                              "Symlinks",
				"taprohl1":                              "TAPR-OHL-1.0",
				"taprohl1.0":                            "TAPR-OHL-1.0",
				"taprohl1.0.0":                          "TAPR-OHL-1.0",
				"tcl":                                   "TCL",
				"tcpwrappers":                           "TCP-wrappers",
				"tmate":                                 "TMate",
				"torque1":                               "TORQUE-1.1",
				"torque1.1":                             "TORQUE-1.1",
				"torque1.1.0":                           "TORQUE-1.1",
				"tosl":                                  "TOSL",
				"tpdl":                                  "TPDL",
				"tpl1":                                  "TPL-1.0",
				"tpl1.0":                                "TPL-1.0",
				"tpl1.0.0":                              "TPL-1.0",
				"ttwl":                                  "TTWL",
				"tuberlin1":                             "TU-Berlin-1.0",
				"tuberlin1.0":                           "TU-Berlin-1.0",
				"tuberlin1.0.0":                         "TU-Berlin-1.0",
				"tuberlin2":                             "TU-Berlin-2.0",
				"tuberlin2.0":                           "TU-Berlin-2.0",
				"tuberlin2.0.0":                         "TU-Berlin-2.0",
				"ucar":                                  "UCAR",
				"ucl1":                                  "UCL-1.0",
				"ucl1.0":                                "UCL-1.0",
				"ucl1.0.0":                              "UCL-1.0",
				"unicodedfs2015":                        "Unicode-DFS-2015",
				"unicodedfs2015.0":                      "Unicode-DFS-2015",
				"unicodedfs2015.0.0":                    "Unicode-DFS-2015",
				"unicodedfs2016":                        "Unicode-DFS-2016",
				"unicodedfs2016.0":                      "Unicode-DFS-2016",
				"unicodedfs2016.0.0":                    "Unicode-DFS-2016",
				"unicodetou":                            "Unicode-TOU",
				"unlicense":                             "Unlicense",
				"upl1":                                  "UPL-1.0",
				"upl1.0":                                "UPL-1.0",
				"upl1.0.0":                              "UPL-1.0",
				"vim":                                   "Vim",
				"vostrom":                               "VOSTROM",
				"vsl1":                                  "VSL-1.0",
				"vsl1.0":                                "VSL-1.0",
				"vsl1.0.0":                              "VSL-1.0",
				"w3.0.0c":                               "W3C",
				"w3.0.0c19980720":                       "W3C-19980720",
				"w3.0.0c20150513":                       "W3C-20150513",
				"w3.0.0m":                               "w3m",
				"w3.0c":                                 "W3C",
				"w3.0c19980720":                         "W3C-19980720",
				"w3.0c20150513":                         "W3C-20150513",
				"w3.0m":                                 "w3m",
				"w3c":                                   "W3C",
				"w3c19980720":                           "W3C-19980720",
				"w3c20150513":                           "W3C-20150513",
				"w3m":                                   "w3m",
				"watcom1":                               "Watcom-1.0",
				"watcom1.0":                             "Watcom-1.0",
				"watcom1.0.0":                           "Watcom-1.0",
				"wsuipa":                                "Wsuipa",
				"wtfpl":                                 "WTFPL",
				"wxwindows":                             "wxWindows",
				"x11":                                   "X11",
				"x11.0":                                 "X11",
				"x11.0.0":                               "X11",
				"x11.0.0distributemodificationsvariant": "X11-distribute-modifications-variant",
				"x11.0distributemodificationsvariant":   "X11-distribute-modifications-variant",
				"x11distributemodificationsvariant":     "X11-distribute-modifications-variant",
				"xerox":                                 "Xerox",
				"xfree861":                              "XFree86-1.1",
				"xfree861.1":                            "XFree86-1.1",
				"xfree861.1.0":                          "XFree86-1.1",
				"xinetd":                                "xinetd",
				"xlock":                                 "xlock",
				"xnet":                                  "Xnet",
				"xpp":                                   "xpp",
				"xskat":                                 "XSkat",
				"ypl1":                                  "YPL-1.0",
				"ypl1.0":                                "YPL-1.0",
				"ypl1.0.0":                              "YPL-1.0",
				"ypl1.1":                                "YPL-1.1",
				"ypl1.1.0":                              "YPL-1.1",
				"zed":                                   "Zed",
				"zend2":                                 "Zend-2.0",
				"zend2.0":                               "Zend-2.0",
				"zend2.0.0":                             "Zend-2.0",
				"zimbra1":                               "Zimbra-1.3",
				"zimbra1.3":                             "Zimbra-1.3",
				"zimbra1.3.0":                           "Zimbra-1.3",
				"zimbra1.4":                             "Zimbra-1.4",
				"zimbra1.4.0":                           "Zimbra-1.4",
				"zlib":                                  "Zlib",
				"zlibacknowledgement":                   "zlib-acknowledgement",
				"zpl1":                                  "ZPL-1.1",
				"zpl1.1":                                "ZPL-1.1",
				"zpl1.1.0":                              "ZPL-1.1",
				"zpl2":                                  "ZPL-2.0",
				"zpl2.0":                                "ZPL-2.0",
				"zpl2.0.0":                              "ZPL-2.0",
				"zpl2.1":                                "ZPL-2.1",
				"zpl2.1.0":                              "ZPL-2.1",
			},
		},
	}
	for _, tt := range tests {
		t.Run(tt.fixture, func(t *testing.T) {
			f, err := os.Open(tt.fixture)
			require.NoError(t, err)

			var list LicenseList
			require.NoError(t, json.NewDecoder(f).Decode(&list))

			d := cmp.Diff(tt.want, processSPDXLicense(list))
			if d != "" {
				t.Log("differing license list:\n" + d)
				t.Fail()
			}
		})
	}
}
