From ca87c122ef3df052866a9e05c62d53251ee651b7 Mon Sep 17 00:00:00 2001 From: DmitriyLewen Date: Wed, 17 Jul 2024 13:33:52 +0600 Subject: [PATCH] test: add `System.Net.Http` and `NETStandard.Library` to test file --- .../parser/dotnet/core_deps/parse_test.go | 12 +++++----- .../testdata/without-runtime.deps.json | 22 ++++++++++++++++++- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/pkg/dependency/parser/dotnet/core_deps/parse_test.go b/pkg/dependency/parser/dotnet/core_deps/parse_test.go index 8e5c486467a5..82bf0e0a1d47 100644 --- a/pkg/dependency/parser/dotnet/core_deps/parse_test.go +++ b/pkg/dependency/parser/dotnet/core_deps/parse_test.go @@ -45,8 +45,8 @@ func TestParse(t *testing.T) { Version: "2.0.61", Locations: []ftypes.Location{ { - StartLine: 60, - EndLine: 66, + StartLine: 66, + EndLine: 72, }, }, }, @@ -56,8 +56,8 @@ func TestParse(t *testing.T) { Version: "1.9.1", Locations: []ftypes.Location{ { - StartLine: 67, - EndLine: 73, + StartLine: 73, + EndLine: 79, }, }, }, @@ -67,8 +67,8 @@ func TestParse(t *testing.T) { Version: "1.3.0", Locations: []ftypes.Location{ { - StartLine: 88, - EndLine: 94, + StartLine: 101, + EndLine: 107, }, }, }, diff --git a/pkg/dependency/parser/dotnet/core_deps/testdata/without-runtime.deps.json b/pkg/dependency/parser/dotnet/core_deps/testdata/without-runtime.deps.json index fee8164d21d6..ba882c61cb5f 100644 --- a/pkg/dependency/parser/dotnet/core_deps/testdata/without-runtime.deps.json +++ b/pkg/dependency/parser/dotnet/core_deps/testdata/without-runtime.deps.json @@ -48,7 +48,13 @@ "System.Collections.Immutable": "1.3.0" } }, - "Microsoft.NETCore.Platforms/1.1.0": {} + "Microsoft.NETCore.Platforms/1.1.0": {}, + "NETStandard.Library/1.6.0": { + "dependencies": { + "System.Net.Http": "4.1.0" + } + }, + "System.Net.Http/4.1.0": {} } }, "libraries": { @@ -85,12 +91,26 @@ "path": "microsoft.netcore.platforms/1.1.0", "hashPath": "microsoft.netcore.platforms.1.1.0.nupkg.sha512" }, + "NETStandard.Library/1.6.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ypsCvIdCZ4IoYASJHt6tF2fMo7N30NLgV1EbmC+snO490OMl9FvVxmumw14rhReWU3j3g7BYudG6YCrchwHJlA==", + "path": "netstandard.library/1.6.0", + "hashPath": "netstandard.library.1.6.0.nupkg.sha512" + }, "System.Collections.Immutable/1.3.0": { "type": "package", "serviceable": true, "sha512": "sha512-zukBRPUuNxwy9m4TGWLxKAnoiMc9+B+8VXeXVyPiBPvOd7yLgAlZ1DlsRWJjMx4VsvhhF2+6q6kO2GRbPja6hA==", "path": "system.collections.immutable/1.3.0", "hashPath": "system.collections.immutable.1.3.0.nupkg.sha512" + }, + "System.Net.Http/4.1.0": { + "type": "package", + "serviceable": true, + "sha512": "sha512-ULq9g3SOPVuupt+Y3U+A37coXzdNisB1neFCSKzBwo182u0RDddKJF8I5+HfyXqK6OhJPgeoAwWXrbiUXuRDsg==", + "path": "system.net.http/4.1.0", + "hashPath": "system.net.http.4.1.0.nupkg.sha512" } } } \ No newline at end of file