github.com/nextlinux/gosbom@v0.81.1-0.20230627115839-1ff50c281391/internal/spdxlicense/license_list_test.go (about)

     1  package spdxlicense
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestLicenceListIDs(t *testing.T) {
    10  	// do a sanity check on the generated data
    11  	assert.Equal(t, "0BSD", licenseIDs["0bsd"])
    12  	assert.Equal(t, "ZPL-2.1", licenseIDs["zpl2.1"])
    13  	assert.Equal(t, "GPL-2.0-only", licenseIDs["gpl2"])
    14  	assert.Equal(t, "GPL-2.0-or-later", licenseIDs["gpl2+"])
    15  	assert.NotEmpty(t, Version)
    16  }