File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
src/Cli/dotnet/Commands/Test
test/dotnet.Tests/CommandTests/Test Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -293,6 +293,7 @@ private static Command GetVSTestCliCommand()
293
293
command . Options . Add ( VerbosityOption ) ;
294
294
command . Options . Add ( CommonOptions . ArchitectureOption ) ;
295
295
command . Options . Add ( CommonOptions . OperatingSystemOption ) ;
296
+ command . Options . Add ( CommonOptions . PropertiesOption ) ;
296
297
command . Options . Add ( CommonOptions . DisableBuildServersOption ) ;
297
298
command . Options . Add ( VsTestTargetOption ) ;
298
299
command . SetAction ( TestCommand . Run ) ;
Original file line number Diff line number Diff line change 3
3
4
4
#nullable disable
5
5
6
+ using System . CommandLine ;
6
7
using Microsoft . DotNet . Cli . Commands . Test ;
7
8
8
9
namespace Microsoft . DotNet . Cli . Test . Tests
@@ -60,5 +61,18 @@ public void SurroundWithDoubleQuotesHandlesCorrectlyOddCountOfTrailingBackslashe
60
61
var result = TestCommandParser . SurroundWithDoubleQuotes ( input ) ;
61
62
result . Should ( ) . Be ( "\" " + input + "\\ \" " ) ;
62
63
}
64
+
65
+ [ Fact ]
66
+ public void VSTestCommandIncludesPropertiesOption ( )
67
+ {
68
+ var command = TestCommandParser . GetCommand ( ) ;
69
+
70
+ // Verify that the command includes a property option that supports the /p alias
71
+ var propertyOption = command . Options . FirstOrDefault ( o =>
72
+ o . Aliases . Contains ( "/p" ) || o . Aliases . Contains ( "--property" ) ) ;
73
+
74
+ propertyOption . Should ( ) . NotBeNull ( "VSTest command should include CommonOptions.PropertiesOption to support /p Property=Value syntax" ) ;
75
+ propertyOption . Aliases . Should ( ) . Contain ( "/p" , "PropertiesOption should include /p alias for MSBuild compatibility" ) ;
76
+ }
63
77
}
64
78
}
You can’t perform that action at this time.
0 commit comments