-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.xml
More file actions
21 lines (17 loc) · 1.09 KB
/
Copy pathtest.xml
File metadata and controls
21 lines (17 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<Project DefaultTargets="Build">
<ItemGroup>
<Test Include="FindMiddle" Min="1" Max="10" N="5" Expected="RESULT=5" />
<Test Include="FindMin" Min="1" Max="10" N="1" Expected="RESULT=5;3;2;1" />
<Test Include="FindMax" Min="1" Max="10" N="10" Expected="RESULT=5;8;9;10" />
<Test Include="Find42InLargeRange" Min="1" Max="100" N="42" Expected="RESULT=50;25;38;44;41;43;42" />
<Test Include="DefaultArgs" Expected="RESULT=50;25;13;19;16;18;17" />
</ItemGroup>
<Target Name="Build" Outputs="%(Test.Identity)">
<Message Text="Running test: %(Test.Identity)" Importance="high" />
<Exec Command='msbuild search.xml /p:Min=%(Test.Min) /p:Max=%(Test.Max) /p:N=%(Test.N) /nologo /v:minimal | grep.exe -o "RESULT=.*"' ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="_ActualOutput" />
</Exec>
<Error Text="Test %(Test.Identity) FAILED. Expected: %(Test.Expected) Actual: $(_ActualOutput.Trim())" Condition="'$(_ActualOutput.Trim())' != '%(Test.Expected)'" />
<Message Text="Test %(Test.Identity) PASSED" Importance="high" />
</Target>
</Project>