-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16310 from tamasvajk/buildless/nuget_versions
C#: Add integration test with multiple versions of the same nuget pac…
- Loading branch information
Showing
7 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
...l/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
| [...]/newtonsoft.json/13.0.1/lib/netstandard2.0/Newtonsoft.Json.dll | |
18 changes: 18 additions & 0 deletions
18
csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Assemblies.ql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import csharp | ||
|
||
private string getPath(Assembly a) { | ||
not a.getCompilation().getOutputAssembly() = a and | ||
exists(string s | s = a.getFile().getAbsolutePath() | | ||
exists(result.indexOf("Newtonsoft.Json")) and | ||
result = | ||
"[...]" + | ||
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 + | ||
"/packages".length(), s.length()) | ||
or | ||
result = s and | ||
not exists(s.indexOf("test-db/working/")) | ||
) | ||
} | ||
|
||
from Assembly a | ||
select getPath(a) |
6 changes: 6 additions & 0 deletions
6
csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Program | ||
{ | ||
static void Main(string[] args) | ||
{ | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
...rp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d1/test1.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net8.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean"> | ||
<RemoveDir Directories=".\bin" /> | ||
<RemoveDir Directories=".\obj" /> | ||
</Target> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="8.0.1" /> | ||
</ItemGroup> | ||
</Project> |
16 changes: 16 additions & 0 deletions
16
...rp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/d2/test2.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFrameworks>net8.0</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<Target Name="DeleteBinObjFolders" BeforeTargets="Clean"> | ||
<RemoveDir Directories=".\bin" /> | ||
<RemoveDir Directories=".\obj" /> | ||
</Target> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" /> | ||
</ItemGroup> | ||
</Project> |
5 changes: 5 additions & 0 deletions
5
csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/global.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"sdk": { | ||
"version": "8.0.101" | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget_versions/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
from create_database_utils import * | ||
|
||
run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"]) |