Skip to content

Commit

Permalink
fix PR comment: add test for failure and filename
Browse files Browse the repository at this point in the history
  • Loading branch information
szaliszali committed Jan 9, 2020
1 parent 4ce6130 commit a7d46bc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/MSBuild.UnitTests/CommandLineSwitches_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,25 @@ public void TargetsSwitchIdentificationTests(string @switch)
emptyParametersAllowed.ShouldBeFalse();
}

[Fact]
public void TargetsSwitchParameter()
{
CommandLineSwitches switches = new CommandLineSwitches();
MSBuildApp.GatherCommandLineSwitches(new ArrayList() { "/targets:targets.txt" }, switches);

switches.HaveErrors().ShouldBeFalse();
switches[CommandLineSwitches.ParameterizedSwitch.Targets].ShouldBe(new[] { "targets.txt" });
}

[Fact]
public void TargetsSwitchDoesNotSupportMultipleOccurrences()
{
CommandLineSwitches switches = new CommandLineSwitches();
MSBuildApp.GatherCommandLineSwitches(new ArrayList() { "/targets /targets" }, switches);

switches.HaveErrors().ShouldBeTrue();
}

[Fact]
public void IsolateProjectsSwitchIdentificationTests()
{
Expand Down

0 comments on commit a7d46bc

Please sign in to comment.