Skip to content

Commit 0b54846

Browse files
committed
test: -diag switch order in arg list doesn't matter
1 parent 178b1d3 commit 0b54846

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/GitVersion.App.Tests/ArgumentParserTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,21 @@ public void AllowshallowTrueWhenDefined()
636636
arguments.AllowShallow.ShouldBe(true);
637637
}
638638

639+
[Test]
640+
public void DiagTrueWhenDefined()
641+
{
642+
var arguments = this.argumentParser.ParseArguments("-diag");
643+
arguments.Diag.ShouldBe(true);
644+
}
645+
646+
[Test]
647+
public void DiagAndLogToConsoleIsNotIgnored()
648+
{
649+
var arguments = this.argumentParser.ParseArguments("-diag -l console");
650+
arguments.Diag.ShouldBe(true);
651+
arguments.LogFilePath.ShouldBe("console");
652+
}
653+
639654
[Test]
640655
public void OtherArgumentsCanBeParsedBeforeNofetch()
641656
{

0 commit comments

Comments
 (0)