Skip to content

Commit

Permalink
Parser tests: Add whitespace test
Browse files Browse the repository at this point in the history
  • Loading branch information
mfkl committed Oct 1, 2020
1 parent 652c4ed commit e624312
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Build.UnitTests/Parser_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -526,5 +526,18 @@ public void VerifyNoWarningForOrder()
// Make sure the log contains the correct strings.
Assert.DoesNotContain("MSB4130:", ml.FullLog); // "No need to warn for this expression - ($(a) == 1 or $(b) == 2) and $(c) == 3."
}

[Fact]
public void WhitespaceTest()
{
MockLogger ml = ObjectModelHelpers.BuildProjectExpectFailure(@"
<Project ToolsVersion=`msbuilddefaulttoolsversion` xmlns=`msbuildnamespace`>
<Target Name=`Build`>
<Warning Text=`should error on this line` Condition=`$(MSBuildProjectFullPath ) != ''`/>
</Target>
</Project>");

Assert.Contains("MSB4151:", ml.FullLog);
}
}
}

0 comments on commit e624312

Please sign in to comment.