github.com/noqcks/syft@v0.0.0-20230920222752-a9e2c4e288e5/syft/pkg/cataloger/cpp/cataloger_test.go (about) 1 package cpp 2 3 import ( 4 "testing" 5 6 "github.com/anchore/syft/syft/pkg/cataloger/internal/pkgtest" 7 ) 8 9 func TestCataloger_Globs(t *testing.T) { 10 tests := []struct { 11 name string 12 fixture string 13 expected []string 14 }{ 15 { 16 name: "obtain conan files", 17 fixture: "test-fixtures/glob-paths", 18 expected: []string{ 19 "somewhere/src/conanfile.txt", 20 "somewhere/src/conan.lock", 21 }, 22 }, 23 } 24 25 for _, test := range tests { 26 t.Run(test.name, func(t *testing.T) { 27 pkgtest.NewCatalogTester(). 28 FromDirectory(t, test.fixture). 29 ExpectsResolverContentQueries(test.expected). 30 TestCataloger(t, NewConanCataloger()) 31 }) 32 } 33 }