Skip to content

Commit

Permalink
Fixed two test misusing the StringArgumentHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
Roadrunner67 committed Jan 5, 2025
1 parent b567c75 commit d3d97c7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions source/Nuke.Tooling.Tests/ArgumentStringHandlerTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ public void Test()
[Fact]
public void TestString()
{
ArgsToString("start end").Should().Be("start end");
// If we want two words without quotes, we need to pass them as two arguments
ArgsToString($"{"start"} {"end"}").Should().Be("start end");
ArgsToString("").Should().Be("");
ArgsToString(" ").Should().Be("");
}
Expand Down Expand Up @@ -88,7 +89,8 @@ public void TestFormat()
[Fact]
public void TestUnquote()
{
ArgsToString($"{"start end"}").Should().Be("start end");
// If we want two words without quotes, we need to pass them as two arguments
ArgsToString($"{"start"} {"end"}").Should().Be("start end");
ArgsToString($"start {"spaced end"}").Should().Be("start \"spaced end\"");
ArgsToString($"{"spaced start"} end").Should().Be("\"spaced start\" end");
ArgsToString($"{"spaced start"} {"spaced end"}").Should().Be("\"spaced start\" \"spaced end\"");
Expand Down

0 comments on commit d3d97c7

Please sign in to comment.