Skip to content

Commit

Permalink
make sure to disable emitting escape sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
smdn committed Dec 14, 2024
1 parent 42c187b commit 1413a95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tests/Smdn.LibHighlightSharp/AssemblyMetadata.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-FileCopyrightText: 2022 smdn <smdn@smdn.jp>
// SPDX-License-Identifier: GPL-3.0-or-later
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
Expand Down Expand Up @@ -40,8 +41,11 @@ public void TestReferencedBindingsVersion()
var commandLine = RuntimeInformation.IsOSPlatform(OSPlatform.Windows)
? $"dotnet run --project \"{pathToToolProject}\" -- \"{pathToAssemblySmdnLibHighlight}\" \"{pathToAssemblySmdnLibHighlightBindings}\""
: $"dotnet run --project '{pathToToolProject}' -- '{pathToAssemblySmdnLibHighlight}' '{pathToAssemblySmdnLibHighlightBindings}'";
var environmentVariables = new Dictionary<string, string>() {
["NO_COLOR"] = "NO_COLOR", // disable emitting ANSI color escape codes
};

if (0 != Shell.Execute(commandLine, out var stdout, out var stderr)) {
if (0 != Shell.Execute(commandLine, arguments: null, environmentVariables, out var stdout, out var stderr)) {
TestContext.Out.WriteLine("[command line]");
TestContext.Out.WriteLine(commandLine);
TestContext.Out.WriteLine("[stdout]");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SPDX-License-Identifier: MIT
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Smdn.Fundamental.Shell" Version="3.*" />
<PackageReference Include="Smdn.Fundamental.Shell" Version="3.1.0" />
</ItemGroup>

<!-- set default value -->
Expand Down

0 comments on commit 1413a95

Please sign in to comment.