Skip to content

Commit 263a4a9

Browse files
committed
C#: Allow other characters between build-stdput and the expected message.
1 parent f89e80f commit 263a4a9

File tree

2 files changed

+7
-4
lines changed
  • csharp/ql/integration-tests/all-platforms

2 files changed

+7
-4
lines changed

csharp/ql/integration-tests/all-platforms/dotnet_build/test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
import os
2+
13
def check_build_out(msg, s):
4+
lines = s.splitlines()
5+
lines = s.splitlines()
26
assert (
3-
"[build-stdout] " + msg in s
7+
any (("[build-stdout]" in line) and (msg in line) for line in lines)
48
), f"The C# tracer did not interpret the dotnet path-to-application command correctly."
59

6-
710
def test1(codeql, csharp):
811
codeql.database.create(command="dotnet build")
912

csharp/ql/integration-tests/all-platforms/dotnet_run/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
def check_build_out(msg, s):
2+
lines = s.splitlines()
23
assert (
3-
"[build-stdout] " + msg in s
4+
any (("[build-stdout]" in line) and (msg in line) for line in lines)
45
), "The C# tracer did not interpret the 'dotnet run' command correctly"
56

6-
77
# no arguments
88
def test_no_args(codeql, csharp):
99
s = codeql.database.create(command="dotnet run", _capture="stdout")

0 commit comments

Comments
 (0)