LockFilePatcher should only patch when lock file has holes in it
If not, the export file is stale
This commit is contained in:
parent
385a3d65da
commit
d20e0d74f2
5 changed files with 74 additions and 1 deletions
|
@ -52,6 +52,21 @@ namespace Microsoft.DotNet.ProjectModel.Tests
|
|||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestFragmentExistsButNoHolesInLockFile()
|
||||
{
|
||||
var lockFilePath = GetLockFilePath("valid_staleFragment");
|
||||
var lockFile = LockFileReader.Read(lockFilePath);
|
||||
|
||||
var exportFile = lockFile.ExportFile;
|
||||
|
||||
exportFile.Should().BeNull();
|
||||
|
||||
lockFile.Targets.Count.Should().Be(1);
|
||||
|
||||
lockFile.Targets[0].Libraries.Count.Should().Be(0);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestMissingExportFileThrows()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue