Add System.ComponentModel.Composition xunit tests
[mono-project.git] / msvc / compare-config-content.ps1
blob0ed84ba3a05b7616381435602200557bde600c76
1 ##############################################################################
2 ##
3 ## compare-config-content
4 ##
5 ##############################################################################
7 <#
9 .SYNOPSIS
11 Compares mono build configuration content detecting diff's.
15 param(
16 ## first config source to compare.
17 $mono_config_source1,
19 ## second config source to compare.
20 $mono_config_source2
23 if ((Test-Path -isvalid $mono_config_source1) -And (Test-Path $mono_config_source1))
25 $mono_config_source1_content = Get-Content $mono_config_source1
27 else
29 $mono_config_source1_content = $mono_config_source1
32 if ((Test-Path -isvalid $mono_config_source2) -And (Test-Path $mono_config_source2))
34 $mono_config_source2_content = Get-Content $mono_config_source2
36 else
38 $mono_config_source2_content = $mono_config_source2
41 ## Compare content.
42 $comparedLines = Compare-Object $mono_config_source1_content $mono_config_source2_content -IncludeEqual | Sort-Object { $_.InputObject.ReadCount }
43 $comparedLines | foreach {
44 if($_.SideIndicator -ne "==")
46 Write-Host "Changes detected."
47 exit 1;
51 exit 0;