mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
Added the SWI Prolog (swipl) ecosystem (#3076)
* Add binary classifier for swipl Signed-off-by: Laurent Goderre <laurent.goderre@docker.com> * Added cataloger for SWI Prolog Pack packages Signed-off-by: Laurent Goderre <laurent.goderre@docker.com> --------- Signed-off-by: Laurent Goderre <laurent.goderre@docker.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package swipl
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/anchore/syft/syft/artifact"
|
||||
"github.com/anchore/syft/syft/file"
|
||||
"github.com/anchore/syft/syft/pkg"
|
||||
"github.com/anchore/syft/syft/pkg/cataloger/internal/pkgtest"
|
||||
)
|
||||
|
||||
func TestParsePackPackage(t *testing.T) {
|
||||
fixture := "test-fixtures/pack.pl"
|
||||
locations := file.NewLocationSet(file.NewLocation(fixture))
|
||||
expectedPkgs := []pkg.Package{
|
||||
{
|
||||
Name: "hdt",
|
||||
Version: "0.5.2",
|
||||
PURL: "pkg:swiplpack/hdt@0.5.2",
|
||||
Locations: locations,
|
||||
Language: pkg.Swipl,
|
||||
Type: pkg.SwiplPackPkg,
|
||||
Metadata: pkg.SwiplPackEntry{
|
||||
Name: "hdt",
|
||||
Version: "0.5.2",
|
||||
Author: "Jan Wielemaker",
|
||||
AuthorEmail: "J.Wielemaker@vu.nl",
|
||||
Packager: "Jan Wielemaker",
|
||||
PackagerEmail: "J.Wielemaker@vu.nl",
|
||||
Homepage: "https://github.com/JanWielemaker/hdt",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
// TODO: no relationships are under test yet
|
||||
var expectedRelationships []artifact.Relationship
|
||||
|
||||
pkgtest.TestFileParser(t, fixture, parsePackPackage, expectedPkgs, expectedRelationships)
|
||||
}
|
||||
Reference in New Issue
Block a user