# Everything below is upstream test data under testdata/, installed because the
# tests that read it run from the installed sources, and because grype builds
# against this package. None of it is code that runs on a Debian system.

# .gitignore files inside fixture trees: some of the catalogers test what happens
# when they walk a directory that has one, so the file is the fixture.
golang-github-anchore-syft-dev: package-contains-vcs-control-file [usr/share/gocode/src/github.com/anchore/syft/*/testdata/*]

# Jars with no class files, and archives that are deliberately truncated or
# corrupt: the Java cataloger is tested against exactly that.
golang-github-anchore-syft-dev: codeless-jar [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/java/testdata/*]
golang-github-anchore-syft-dev: broken-bz2 [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/java/testdata/*]
golang-github-anchore-syft-dev: broken-gz [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/java/testdata/*]
golang-github-anchore-syft-dev: broken-xz [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/java/testdata/*]
golang-github-anchore-syft-dev: broken-zip [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/java/testdata/*]

# Snippets of binaries, a few hundred bytes each, kept so the binary classifiers
# can be tested without shipping whole programs. lintian reads two of the elixir
# ones as shell scripts because of what the first bytes happen to be.
golang-github-anchore-syft-dev: shell-script-fails-syntax-check [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/binary/testdata/*]
golang-github-anchore-syft-dev: script-not-executable [usr/share/gocode/src/github.com/anchore/syft/syft/pkg/cataloger/binary/testdata/*]
golang-github-anchore-syft-dev: executable-not-elf-or-script [usr/share/gocode/src/github.com/anchore/syft/*/testdata/*]

# Fixtures that contain a bundled lodash: the point of those tests is to find it,
# so replacing it with libjs-lodash would remove the test.
golang-github-anchore-syft-dev: embedded-javascript-library please use libjs-lodash [usr/share/gocode/src/github.com/anchore/syft/*/testdata/*]

# Upstream's own fixture for "a symlink that points at its own directory", read
# by the resolver tests. dh-go keeps symlinks since 1.69
# (https://bugs.debian.org/842755), so it now reaches the package, which is what
# the tests need.
golang-github-anchore-syft-dev: symlink-is-self-recursive * [usr/share/gocode/src/github.com/anchore/syft/syft/file/testdata/req-resp/root-link]
golang-github-anchore-syft-dev: symlink-is-self-recursive * [usr/share/gocode/src/github.com/anchore/syft/syft/internal/fileresolver/testdata/req-resp/root-link]
