github.com/lineaje-labs/syft@v0.98.1-0.20231227153149-9e393f60ff1b/cmd/syft/cli/options/format_spdx_json_test.go (about)

     1  package options
     2  
     3  import (
     4  	"testing"
     5  )
     6  
     7  func TestFormatSPDXJSON_buildConfig(t *testing.T) {
     8  	// assert when building the config that we respond to all possible fields
     9  
    10  	ft := &FormatSPDXJSON{}
    11  	ft = setAllToNonZero(t, ft).(*FormatSPDXJSON)
    12  
    13  	subject := ft.buildConfig("Version")
    14  	assertExpectedValue(t, subject)
    15  }