Skip to content

Commit 2a62bfd

Browse files
committed
C#: Add integration test with space in packages.config path
1 parent 16e9ced commit 2a62bfd

File tree

8 files changed

+44
-0
lines changed

8 files changed

+44
-0
lines changed

csharp/ql/integration-tests/posix-only/standalone_dependencies_nuget with_space/Assemblies.expected

Whitespace-only changes.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import csharp
2+
3+
private string getPath(Assembly a) {
4+
not a.getCompilation().getOutputAssembly() = a and
5+
exists(string s | s = a.getFile().getAbsolutePath() |
6+
result =
7+
"[...]" +
8+
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
9+
"/legacypackages".length(), s.length())
10+
// TODO: include all other assemblies from the test results. Initially disable because mono installations were problematic on ARM runners.
11+
)
12+
}
13+
14+
from Assembly a
15+
select getPath(a)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Program
2+
{
3+
static void Main(string[] args)
4+
{
5+
}
6+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.101"
4+
}
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net461" />
4+
<package id="NUnit.ConsoleRunner" version="3.12.0" />
5+
</packages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skipping the test on the ARM runners, as we're running into trouble with Mono and nuget.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
4+
</Project>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from create_database_utils import *
2+
import os
3+
4+
# making sure we're not doing any fallback restore:
5+
os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_TIMEOUT"] = "1"
6+
os.environ["CODEQL_EXTRACTOR_CSHARP_BUILDLESS_NUGET_FEEDS_CHECK_FALLBACK_LIMIT"] = "1"
7+
8+
run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"])

0 commit comments

Comments
 (0)