-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9534 from rainersigwald/right-justify
- Loading branch information
Showing
29 changed files
with
377 additions
and
489 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Microsoft.Build.Logging.TerminalLogger; | ||
|
||
using VerifyTests; | ||
using VerifyXunit; | ||
using Xunit; | ||
|
||
using static VerifyXunit.Verifier; | ||
|
||
|
||
namespace Microsoft.Build.CommandLine.UnitTests; | ||
|
||
[UsesVerify] | ||
public class NodeStatus_Tests | ||
{ | ||
private readonly NodeStatus _status = new("Namespace.Project", "TargetFramework", "Target", new()); | ||
|
||
public NodeStatus_Tests() | ||
{ | ||
UseProjectRelativeDirectory("Snapshots"); | ||
} | ||
|
||
[Fact] | ||
public async Task EverythingFits() | ||
{ | ||
NodesFrame frame = new(new[] { _status }, width: 80, height: 5); | ||
|
||
await Verify(frame.RenderNodeStatus(_status).ToString()); | ||
} | ||
|
||
[Fact] | ||
public async Task TargetIsTruncatedFirst() | ||
{ | ||
NodesFrame frame = new(new[] { _status }, width: 45, height: 5); | ||
|
||
await Verify(frame.RenderNodeStatus(_status).ToString()); | ||
} | ||
|
||
[Fact] | ||
public async Task NamespaceIsTruncatedNext() | ||
{ | ||
NodesFrame frame = new(new[] { _status }, width: 40, height: 5); | ||
|
||
await Verify(frame.RenderNodeStatus(_status).ToString()); | ||
} | ||
|
||
[Fact] | ||
public async Task GoesToProject() | ||
{ | ||
NodesFrame frame = new(new[] { _status }, width: 10, height: 5); | ||
|
||
await Verify(frame.RenderNodeStatus(_status).ToString()); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
src/MSBuild.UnitTests/Snapshots/NodeStatus_Tests.EverythingFits.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Namespace.Project [36;1mTargetFramework[m [120G[13DTarget (0.0s) |
1 change: 1 addition & 0 deletions
1
src/MSBuild.UnitTests/Snapshots/NodeStatus_Tests.GoesToProject.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Project |
1 change: 1 addition & 0 deletions
1
src/MSBuild.UnitTests/Snapshots/NodeStatus_Tests.NamespaceIsTruncatedNext.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Project [36;1mTargetFramework[m [120G[7D (0.0s) |
1 change: 1 addition & 0 deletions
1
src/MSBuild.UnitTests/Snapshots/NodeStatus_Tests.TargetIsTruncatedFirst.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Namespace.Project [36;1mTargetFramework[m [120G[7D (0.0s) |
4 changes: 2 additions & 2 deletions
4
...hots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Linux.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
]9;4;3;\[?25l[1F | ||
project [36;1mtfName[m Build (0.0s) | ||
project [36;1mtfName[m [120G[12DBuild (0.0s) | ||
[?25h[?25l[2F | ||
project [36;1mtf2[m Build (0.0s)[K | ||
[K project [36;1mtf2[m [120G[12DBuild (0.0s) | ||
[?25h |
4 changes: 2 additions & 2 deletions
4
...pshots/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.OSX.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[?25l[1F | ||
project [36;1mtfName[m Build (0.0s) | ||
project [36;1mtfName[m [120G[12DBuild (0.0s) | ||
[?25h[?25l[2F | ||
project [36;1mtf2[m Build (0.0s)[K | ||
[K project [36;1mtf2[m [120G[12DBuild (0.0s) | ||
[?25h |
4 changes: 2 additions & 2 deletions
4
...ts/TerminalLogger_Tests.DisplayNodesOverwritesWithNewTargetFramework.Windows.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
]9;4;3;\[?25l[1F | ||
project [36;1mtfName[m Build (0.0s) | ||
project [36;1mtfName[m [120G[12DBuild (0.0s) | ||
[?25h[?25l[2F | ||
project [36;1mtf2[m Build (0.0s)[K | ||
[K project [36;1mtf2[m [120G[12DBuild (0.0s) | ||
[?25h |
2 changes: 1 addition & 1 deletion
2
...uild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Linux.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
]9;4;3;\[?25l[1F | ||
project Build (0.0s) | ||
project [120G[12DBuild (0.0s) | ||
[?25h |
2 changes: 1 addition & 1 deletion
2
...SBuild.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.OSX.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[?25l[1F | ||
project Build (0.0s) | ||
project [120G[12DBuild (0.0s) | ||
[?25h |
2 changes: 1 addition & 1 deletion
2
...ld.UnitTests/Snapshots/TerminalLogger_Tests.DisplayNodesShowsCurrent.Windows.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
]9;4;3;\[?25l[1F | ||
project Build (0.0s) | ||
project [120G[12DBuild (0.0s) | ||
[?25h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.