remove cross project reference from dotnet-remove-p2p (and fix local failures)
This commit is contained in:
parent
35bc8e1cc1
commit
88e7f0f593
2 changed files with 8 additions and 12 deletions
|
@ -118,7 +118,7 @@ Additional Arguments:
|
||||||
{
|
{
|
||||||
var cmd = new RemoveP2PCommand().Execute(helpArg);
|
var cmd = new RemoveP2PCommand().Execute(helpArg);
|
||||||
cmd.Should().Pass();
|
cmd.Should().Pass();
|
||||||
cmd.StdOut.Should().Be(HelpText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(HelpText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Theory]
|
[Theory]
|
||||||
|
@ -156,7 +156,7 @@ Additional Arguments:
|
||||||
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
||||||
cmd.ExitCode.Should().NotBe(0);
|
cmd.ExitCode.Should().NotBe(0);
|
||||||
cmd.StdErr.Should().Be($"Could not find project or directory `{projName}`.");
|
cmd.StdErr.Should().Be($"Could not find project or directory `{projName}`.");
|
||||||
cmd.StdOut.Should().Be(HelpText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(HelpText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
@ -171,7 +171,7 @@ Additional Arguments:
|
||||||
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
||||||
cmd.ExitCode.Should().NotBe(0);
|
cmd.ExitCode.Should().NotBe(0);
|
||||||
cmd.StdErr.Should().Be("Project `Broken/Broken.csproj` is invalid.");
|
cmd.StdErr.Should().Be("Project `Broken/Broken.csproj` is invalid.");
|
||||||
cmd.StdOut.Should().Be(HelpText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(HelpText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
@ -185,7 +185,7 @@ Additional Arguments:
|
||||||
.Execute($"\"{setup.ValidRefCsprojRelToOtherProjPath}\"");
|
.Execute($"\"{setup.ValidRefCsprojRelToOtherProjPath}\"");
|
||||||
cmd.ExitCode.Should().NotBe(0);
|
cmd.ExitCode.Should().NotBe(0);
|
||||||
cmd.StdErr.Should().Be($"Found more than one project in `{workingDir + Path.DirectorySeparatorChar}`. Please specify which one to use.");
|
cmd.StdErr.Should().Be($"Found more than one project in `{workingDir + Path.DirectorySeparatorChar}`. Please specify which one to use.");
|
||||||
cmd.StdOut.Should().Be(HelpText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(HelpText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
@ -198,7 +198,7 @@ Additional Arguments:
|
||||||
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
.Execute($"\"{setup.ValidRefCsprojPath}\"");
|
||||||
cmd.ExitCode.Should().NotBe(0);
|
cmd.ExitCode.Should().NotBe(0);
|
||||||
cmd.StdErr.Should().Be($"Could not find any project in `{setup.TestRoot + Path.DirectorySeparatorChar}`.");
|
cmd.StdErr.Should().Be($"Could not find any project in `{setup.TestRoot + Path.DirectorySeparatorChar}`.");
|
||||||
cmd.StdOut.Should().Be(HelpText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(HelpText);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Fact]
|
[Fact]
|
||||||
|
@ -384,7 +384,7 @@ Project reference `{setup.LibCsprojRelPath}` removed.";
|
||||||
.WithProject(proj.CsProjPath)
|
.WithProject(proj.CsProjPath)
|
||||||
.Execute($"\"{libref.CsProjPath}\"");
|
.Execute($"\"{libref.CsProjPath}\"");
|
||||||
cmd.Should().Pass();
|
cmd.Should().Pass();
|
||||||
cmd.StdOut.Should().Be(removedText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(removedText);
|
||||||
|
|
||||||
var csproj = proj.CsProj();
|
var csproj = proj.CsProj();
|
||||||
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
||||||
|
@ -465,7 +465,7 @@ Project reference `{Path.Combine(TestSetup.ProjectName, setup.ValidRefCsprojRelP
|
||||||
.WithProject(lib.CsProjPath)
|
.WithProject(lib.CsProjPath)
|
||||||
.Execute($"\"{libref.CsProjPath}\" \"{validref.CsProjPath}\"");
|
.Execute($"\"{libref.CsProjPath}\" \"{validref.CsProjPath}\"");
|
||||||
cmd.Should().Pass();
|
cmd.Should().Pass();
|
||||||
cmd.StdOut.Should().Be(outputText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(outputText);
|
||||||
var csproj = lib.CsProj();
|
var csproj = lib.CsProj();
|
||||||
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
||||||
csproj.NumberOfProjectReferencesWithIncludeContaining(libref.Name).Should().Be(0);
|
csproj.NumberOfProjectReferencesWithIncludeContaining(libref.Name).Should().Be(0);
|
||||||
|
@ -489,7 +489,7 @@ Project reference `{Path.Combine(TestSetup.ProjectName, setup.ValidRefCsprojRelP
|
||||||
.WithProject(lib.CsProjPath)
|
.WithProject(lib.CsProjPath)
|
||||||
.Execute($"\"{libref.CsProjPath}\" \"{validref.CsProjPath}\"");
|
.Execute($"\"{libref.CsProjPath}\" \"{validref.CsProjPath}\"");
|
||||||
cmd.Should().Pass();
|
cmd.Should().Pass();
|
||||||
cmd.StdOut.Should().Be(OutputText);
|
cmd.StdOut.Should().BeVisuallyEquivalentTo(OutputText);
|
||||||
var csproj = lib.CsProj();
|
var csproj = lib.CsProj();
|
||||||
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
csproj.NumberOfItemGroupsWithoutCondition().Should().Be(noCondBefore - 1);
|
||||||
csproj.NumberOfProjectReferencesWithIncludeContaining(validref.Name).Should().Be(0);
|
csproj.NumberOfProjectReferencesWithIncludeContaining(validref.Name).Should().Be(0);
|
||||||
|
|
|
@ -6,13 +6,9 @@
|
||||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||||
<AssemblyName>dotnet-remove-p2p.Tests</AssemblyName>
|
<AssemblyName>dotnet-remove-p2p.Tests</AssemblyName>
|
||||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
|
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.0' ">$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
|
||||||
<DefineConstants>$(DefineConstants);DISABLE_TRACE</DefineConstants>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="**\*.cs" />
|
<Compile Include="**\*.cs" />
|
||||||
<Compile Include="..\..\src\Microsoft.DotNet.ProjectJsonMigration\MSBuildExtensions.cs">
|
|
||||||
<Link>src\Microsoft.DotNet.ProjectJsonMigration\MSBuildExtensions.cs</Link>
|
|
||||||
</Compile>
|
|
||||||
<EmbeddedResource Include="**\*.resx" />
|
<EmbeddedResource Include="**\*.resx" />
|
||||||
<EmbeddedResource Include="compiler\resources\**\*" />
|
<EmbeddedResource Include="compiler\resources\**\*" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue