github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/ocaml/cataloger_test.go (about) 1 package ocaml 2 3 import ( 4 "testing" 5 6 "github.com/anchore/syft/syft/pkg/cataloger/internal/pkgtest" 7 ) 8 9 func Test_PackageCataloger_Globs(t *testing.T) { 10 tests := []struct { 11 name string 12 fixture string 13 expected []string 14 }{ 15 { 16 name: "obtain package files", 17 fixture: "test-fixtures/glob-paths", 18 expected: []string{ 19 "opam/alcotest.opam", 20 "opam/ocaml-base-compiler.4.14.0/opam", 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, NewOpamPackageManagerCataloger()) 31 }) 32 } 33 }