Skip to content

Commit

Permalink
C#: Allow other characters between build-stdput and the expected mess…
Browse files Browse the repository at this point in the history
…age.
  • Loading branch information
michaelnebel committed Nov 18, 2024
1 parent 05320fd commit 65b0a3d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import os

def check_build_out(msg, s):
lines = s.splitlines()
lines = s.splitlines()
assert (
"[build-stdout] " + msg in s
any (("[build-stdout]" in line) and (msg in line) for line in lines)
), f"The C# tracer did not interpret the dotnet path-to-application command correctly."


def test1(codeql, csharp):
codeql.database.create(command="dotnet build")

Expand Down
4 changes: 2 additions & 2 deletions csharp/ql/integration-tests/all-platforms/dotnet_run/test.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
def check_build_out(msg, s):
lines = s.splitlines()
assert (
"[build-stdout] " + msg in s
any (("[build-stdout]" in line) and (msg in line) for line in lines)
), "The C# tracer did not interpret the 'dotnet run' command correctly"


# no arguments
def test_no_args(codeql, csharp):
s = codeql.database.create(command="dotnet run", _capture="stdout")
Expand Down

0 comments on commit 65b0a3d

Please sign in to comment.