@@ -1078,8 +1078,8 @@ await debugService.SetLineBreakpointsAsync(
1078
1078
1079
1079
// Verifies fix for issue #86, $proc = Get-Process foo displays just the ETS property set
1080
1080
// and not all process properties.
1081
- [ Fact ( Skip = "Length of child vars is wrong now" ) ]
1082
- public async Task DebuggerVariableProcessObjDisplaysCorrectly ( )
1081
+ [ Fact ]
1082
+ public async Task DebuggerVariableProcessObjectDisplaysCorrectly ( )
1083
1083
{
1084
1084
await debugService . SetLineBreakpointsAsync (
1085
1085
variableScriptFile ,
@@ -1098,7 +1098,31 @@ await debugService.SetLineBreakpointsAsync(
1098
1098
Assert . True ( var . IsExpandable ) ;
1099
1099
1100
1100
VariableDetailsBase [ ] childVars = await debugService . GetVariables ( var . Id , CancellationToken . None ) . ConfigureAwait ( true ) ;
1101
- Assert . Equal ( 53 , childVars . Length ) ;
1101
+ Assert . Contains ( childVars , i => i . Name is "Name" && i . ValueString is "\" dotnet\" " ) ;
1102
+ Assert . Contains ( childVars , i => i . Name is "Handles" ) ;
1103
+ Assert . Contains ( childVars , i => i . Name is "CommandLine" ) ;
1104
+ Assert . Contains ( childVars , i => i . Name is "ExitCode" ) ;
1105
+ Assert . Contains ( childVars , i => i . Name is "HasExited" && i . ValueString is "$false" ) ;
1106
+ Assert . Contains ( childVars , i => i . Name is "Id" && i . Type is "[System.Int32]" ) ;
1107
+ }
1108
+
1109
+ [ Fact ]
1110
+ public async Task DebuggerVariableFileObjectDisplaysCorrectly ( )
1111
+ {
1112
+ await debugService . SetCommandBreakpointsAsync (
1113
+ new [ ] { CommandBreakpointDetails . Create ( "Write-Host" ) } ) . ConfigureAwait ( true ) ;
1114
+
1115
+ ScriptFile testScript = GetDebugScript ( "GetChildItemTest.ps1" ) ;
1116
+ Task _ = ExecuteScriptFileAsync ( testScript . FilePath ) ;
1117
+ AssertDebuggerStopped ( testScript . FilePath , 2 ) ;
1118
+
1119
+ VariableDetailsBase [ ] variables = await GetVariables ( VariableContainerDetails . LocalScopeName ) . ConfigureAwait ( true ) ;
1120
+ VariableDetailsBase var = Array . Find ( variables , v => v . Name == "$file" ) ;
1121
+ VariableDetailsBase [ ] childVars = await debugService . GetVariables ( var . Id , CancellationToken . None ) . ConfigureAwait ( true ) ;
1122
+ Assert . Contains ( childVars , i => i . Name is "PSPath" ) ;
1123
+ Assert . Contains ( childVars , i => i . Name is "PSProvider" && i . ValueString is "Microsoft.PowerShell.Core\\ FileSystem" ) ;
1124
+ Assert . Contains ( childVars , i => i . Name is "Exists" && i . ValueString is "$true" ) ;
1125
+ Assert . Contains ( childVars , i => i . Name is "LastAccessTime" ) ;
1102
1126
}
1103
1127
}
1104
1128
}
0 commit comments