C#: Allow other characters between build-stdput and the expected message.

This commit is contained in:
Michael Nebel 2024-11-18 11:19:04 +01:00
Родитель f89e80f402
Коммит 263a4a9fcb
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -1,8 +1,11 @@
def check_build_out(msg, s):
assert (
"[build-stdout] " + msg in s
), f"The C# tracer did not interpret the dotnet path-to-application command correctly."
import os
def check_build_out(msg, s):
lines = s.splitlines()
lines = s.splitlines()
assert (
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")

Просмотреть файл

@ -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")