mirror of
https://github.com/anchore/syft
synced 2024-11-10 06:14:16 +00:00
72616db81f
* fix: or-later suffix has been updated to consider deprecated + If a given license has the suffix "or-later" it previously could have been considered or represented with a "+". Example "GFDL-1.0-or-later" could have been represented as "GFDL-1.0+". This PR allows the license list generation to consider "or-later" as == to "+" when generating permutations for upgrading deprecated licenses. --------- Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
17 lines
466 B
Go
17 lines
466 B
Go
package spdxlicense
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestLicenceListIDs(t *testing.T) {
|
|
// do a sanity check on the generated data
|
|
assert.Equal(t, "0BSD", licenseIDs["0bsd"])
|
|
assert.Equal(t, "ZPL-2.1", licenseIDs["zpl2.1"])
|
|
assert.Equal(t, "GPL-2.0-only", licenseIDs["gpl2"])
|
|
assert.Equal(t, "GPL-2.0-or-later", licenseIDs["gpl2+"])
|
|
assert.Equal(t, "GFDL-1.2-or-later", licenseIDs["gfdl1.2+"])
|
|
assert.NotEmpty(t, Version)
|
|
}
|