@@ -28,6 +28,7 @@ public class DebugServiceTests : IDisposable
28
28
private readonly WorkspaceService workspace ;
29
29
private readonly ScriptFile debugScriptFile ;
30
30
private readonly ScriptFile variableScriptFile ;
31
+ private readonly ScriptFile variableFileInfoTestFile ;
31
32
32
33
public DebugServiceTests ( )
33
34
{
@@ -56,6 +57,7 @@ public DebugServiceTests()
56
57
workspace = new WorkspaceService ( NullLoggerFactory . Instance ) ;
57
58
debugScriptFile = GetDebugScript ( "DebugTest.ps1" ) ;
58
59
variableScriptFile = GetDebugScript ( "VariableTest.ps1" ) ;
60
+ variableFileInfoTestFile = GetDebugScript ( "VariableFileInfoTest.ps1" ) ;
59
61
}
60
62
61
63
public void Dispose ( )
@@ -101,6 +103,8 @@ private Task ExecutePowerShellCommand(string command, params string[] args)
101
103
102
104
private Task ExecuteVariableScriptFile ( ) => ExecutePowerShellCommand ( variableScriptFile . FilePath ) ;
103
105
106
+ private Task ExecuteVariableFileInfoTest ( ) => ExecutePowerShellCommand ( variableFileInfoTestFile . FilePath ) ;
107
+
104
108
private void AssertDebuggerPaused ( )
105
109
{
106
110
var eventArgs = debuggerStoppedQueue . Take ( new CancellationTokenSource ( 5000 ) . Token ) ;
@@ -528,6 +532,26 @@ await debugService.SetLineBreakpointsAsync(
528
532
Assert . False ( var . IsExpandable ) ;
529
533
}
530
534
535
+ // [Trait("Category", "DebugService")]
536
+ // [Fact]
537
+ // public async Task DebuggerFileInfoHasAllProperties()
538
+ // {
539
+ // await debugService.SetLineBreakpointsAsync(
540
+ // variableFileInfoTestFile,
541
+ // new[] { BreakpointDetails.Create(variableFileInfoTestFile.FilePath, 2) }).ConfigureAwait(true);
542
+
543
+ // Task _ = ExecuteVariableFileInfoTest();
544
+ // AssertDebuggerStopped(variableFileInfoTestFile.FilePath);
545
+
546
+ // StackFrameDetails[] stackFrames = await debugService.GetStackFramesAsync().ConfigureAwait(true);
547
+ // VariableDetailsBase[] variables = debugService.GetVariables(stackFrames[0].AutoVariables.Id);
548
+
549
+ // var var = Array.Find(variables, v => v.Name == "$fileInfoItem");
550
+ // Assert.NotNull(var);
551
+ // Assert.Equal("\"Hello\"", var.ValueString);
552
+ // Assert.False(var.IsExpandable);
553
+ // }
554
+
531
555
[ Trait ( "Category" , "DebugService" ) ]
532
556
[ Fact ]
533
557
public async Task DebuggerGetsVariables ( )
0 commit comments