@@ -443,6 +443,48 @@ public void Merge_SolutionFolder_ExistedFolder_SectionExists()
443
443
" . Trim ( ) , content . Trim ( ) ) ;
444
444
}
445
445
446
+ [ Fact ]
447
+ public void Merge_SolutionItems ( )
448
+ {
449
+ var baseSln = SolutionFile . Parse ( @"C:\Path\To\Nantoka\Nantoka.Unity\Nantoka.Unity.sln" , @"
450
+ Microsoft Visual Studio Solution File, Format Version 12.00
451
+ # Visual Studio 16
452
+ Global
453
+ EndGlobal
454
+ " . Trim ( ) ) ;
455
+ var overlaySln = SolutionFile . Parse ( @"C:\Path\To\Nantoka\Nantoka.Server\Nantoka.Server.sln" , @"
456
+ Microsoft Visual Studio Solution File, Format Version 12.00
457
+ # Visual Studio Version 16
458
+ VisualStudioVersion = 16.0.29509.3
459
+ MinimumVisualStudioVersion = 10.0.40219.1
460
+ Project(""{2150E333-8FDC-42A3-9474-1A3956D46DE8}"") = ""Project Settings"", ""Project Settings"", ""{34006C71-946B-49BF-BBCB-BB091E5A3AE7}""
461
+ ProjectSection(SolutionItems) = preProject
462
+ .gitignore = .gitignore
463
+ EndProjectSection
464
+ EndProject
465
+ Global
466
+ EndGlobal
467
+ " . Trim ( ) ) ;
468
+
469
+ var mergedSolutionFile = SlnMerge . Merge (
470
+ baseSln ,
471
+ overlaySln ,
472
+ new SlnMergeSettings ( ) ,
473
+ SlnMergeNullLogger . Instance ) ;
474
+ var content = mergedSolutionFile . ToFileContent ( ) ;
475
+ Assert . Equal ( ( @"
476
+ Microsoft Visual Studio Solution File, Format Version 12.00
477
+ # Visual Studio 16
478
+ Project(""{2150E333-8FDC-42A3-9474-1A3956D46DE8}"") = ""Project Settings"", ""Project Settings"", ""{34006C71-946B-49BF-BBCB-BB091E5A3AE7}""
479
+ ProjectSection(SolutionItems) = preProject
480
+ ..\Nantoka.Server\.gitignore = ..\Nantoka.Server\.gitignore
481
+ EndProjectSection
482
+ EndProject
483
+ Global
484
+ EndGlobal
485
+ " ) . Trim ( ) , content . Trim ( ) ) ;
486
+ }
487
+
446
488
[ Fact ]
447
489
public void TestMerge ( )
448
490
{
0 commit comments