File tree Expand file tree Collapse file tree
Common.BasicHelper.Test/Core/Shell Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,12 +6,26 @@ public class CommandsExecutor_Tests
66 [ TestMethod ]
77 public void Test_ExecuteAsCommand ( )
88 {
9- Console . WriteLine ( "help" . ExecuteAsCommand ( ) ) ;
9+ if ( OperatingSystem . IsWindows ( ) )
10+ Console . WriteLine ( "help" . ExecuteAsCommand ( ) ) ;
11+
12+ if ( OperatingSystem . IsLinux ( ) )
13+ Console . WriteLine ( "apt" . ExecuteAsCommand ( "-v" ) ) ;
14+
15+ if ( OperatingSystem . IsMacOS ( ) )
16+ Console . WriteLine ( "sw_vers" . ExecuteAsCommand ( ) ) ;
1017 }
1118
1219 [ TestMethod ]
1320 public async Task Test_ExecuteAsCommandAsync ( )
1421 {
15- Console . WriteLine ( await "help" . ExecuteAsCommandAsync ( ) ) ;
22+ if ( OperatingSystem . IsWindows ( ) )
23+ Console . WriteLine ( await "help" . ExecuteAsCommandAsync ( ) ) ;
24+
25+ if ( OperatingSystem . IsLinux ( ) )
26+ Console . WriteLine ( await "apt" . ExecuteAsCommandAsync ( "-v" ) ) ;
27+
28+ if ( OperatingSystem . IsMacOS ( ) )
29+ Console . WriteLine ( await "sw_vers" . ExecuteAsCommandAsync ( ) ) ;
1630 }
1731}
You can’t perform that action at this time.
0 commit comments