Skip to content

Commit 402ab4f

Browse files
committed
Add regression test for debugging script with dot-source operator
1 parent dcd9d8f commit 402ab4f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs

+11
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ public void CanInitializeWithCorrectServerSettings()
182182
Assert.True(PsesDebugAdapterClient.ServerSettings.SupportsSetVariable);
183183
}
184184

185+
[Fact]
186+
public async Task UsesDotSourceOperatorAndQuotesAsync()
187+
{
188+
string filePath = NewTestFile(GenerateScriptFromLoggingStatements("$($MyInvocation.Line)"));
189+
await PsesDebugAdapterClient.LaunchScript(filePath, Started).ConfigureAwait(true);
190+
ConfigurationDoneResponse configDoneResponse = await PsesDebugAdapterClient.RequestConfigurationDone(new ConfigurationDoneArguments()).ConfigureAwait(true);
191+
Assert.NotNull(configDoneResponse);
192+
Assert.Collection(await GetLog().ConfigureAwait(true),
193+
(i) => Assert.StartsWith(". \"", i));
194+
}
195+
185196
[Fact]
186197
public async Task CanLaunchScriptWithNoBreakpointsAsync()
187198
{

0 commit comments

Comments
 (0)