Skip to content

Commit 07d8577

Browse files
committed
Fix "Constained" typo
1 parent 7e94697 commit 07d8577

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

test/PowerShellEditorServices.Test.E2E/DebugAdapterProtocolMessageTests.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ public async Task CanLaunchScriptWithNoBreakpointsAsync()
183183
public async Task CanSetBreakpointsAsync()
184184
{
185185
Skip.If(
186-
PsesStdioProcess.RunningInConstainedLanguageMode,
186+
PsesStdioProcess.RunningInConstrainedLanguageMode,
187187
"You can't set breakpoints in ConstrainedLanguage mode.");
188188

189189
string filePath = NewTestFile(GenerateScriptFromLoggingStatements(
@@ -260,7 +260,7 @@ public async Task CanSetBreakpointsAsync()
260260
public async Task CanStepPastSystemWindowsForms()
261261
{
262262
Skip.IfNot(PsesStdioProcess.IsWindowsPowerShell);
263-
Skip.If(PsesStdioProcess.RunningInConstainedLanguageMode);
263+
Skip.If(PsesStdioProcess.RunningInConstrainedLanguageMode);
264264

265265
string filePath = NewTestFile(string.Join(Environment.NewLine, new[]
266266
{

test/PowerShellEditorServices.Test.E2E/LanguageServerProtocolMessageTests.cs

+9-9
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ function CanSendWorkspaceSymbolRequest {
155155
public async Task CanReceiveDiagnosticsFromFileOpenAsync()
156156
{
157157
Skip.If(
158-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
158+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
159159
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
160160

161161
NewTestFile("$a = 4");
@@ -178,7 +178,7 @@ public async Task WontReceiveDiagnosticsFromFileOpenThatIsNotPowerShellAsync()
178178
public async Task CanReceiveDiagnosticsFromFileChangedAsync()
179179
{
180180
Skip.If(
181-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
181+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
182182
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
183183

184184
string filePath = NewTestFile("$a = 4");
@@ -230,7 +230,7 @@ public async Task CanReceiveDiagnosticsFromFileChangedAsync()
230230
public async Task CanReceiveDiagnosticsFromConfigurationChangeAsync()
231231
{
232232
Skip.If(
233-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
233+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
234234
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
235235

236236
NewTestFile("gci | % { $_ }");
@@ -331,7 +331,7 @@ await PsesLanguageClient
331331
public async Task CanSendFormattingRequestAsync()
332332
{
333333
Skip.If(
334-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
334+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
335335
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
336336

337337
string scriptPath = NewTestFile(@"
@@ -368,7 +368,7 @@ public async Task CanSendFormattingRequestAsync()
368368
public async Task CanSendRangeFormattingRequestAsync()
369369
{
370370
Skip.If(
371-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
371+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
372372
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
373373

374374
string scriptPath = NewTestFile(@"
@@ -892,7 +892,7 @@ function CanSendReferencesCodeLensRequest {
892892
public async Task CanSendCodeActionRequestAsync()
893893
{
894894
Skip.If(
895-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
895+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
896896
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
897897

898898
string filePath = NewTestFile("gci");
@@ -1090,7 +1090,7 @@ await PsesLanguageClient
10901090
[SkippableFact]
10911091
public async Task CanSendGetProjectTemplatesRequestAsync()
10921092
{
1093-
Skip.If(PsesStdioProcess.RunningInConstainedLanguageMode, "Plaster doesn't work in ConstrainedLanguage mode.");
1093+
Skip.If(PsesStdioProcess.RunningInConstrainedLanguageMode, "Plaster doesn't work in ConstrainedLanguage mode.");
10941094

10951095
GetProjectTemplatesResponse getProjectTemplatesResponse =
10961096
await PsesLanguageClient
@@ -1110,7 +1110,7 @@ await PsesLanguageClient
11101110
public async Task CanSendGetCommentHelpRequestAsync()
11111111
{
11121112
Skip.If(
1113-
PsesStdioProcess.RunningInConstainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
1113+
PsesStdioProcess.RunningInConstrainedLanguageMode && PsesStdioProcess.IsWindowsPowerShell,
11141114
"Windows PowerShell doesn't trust PSScriptAnalyzer by default so it won't load.");
11151115

11161116
string scriptPath = NewTestFile(@"
@@ -1183,7 +1183,7 @@ await PsesLanguageClient
11831183
public async Task CanSendExpandAliasRequestAsync()
11841184
{
11851185
Skip.If(
1186-
PsesStdioProcess.RunningInConstainedLanguageMode,
1186+
PsesStdioProcess.RunningInConstrainedLanguageMode,
11871187
"This feature currently doesn't support ConstrainedLanguage Mode.");
11881188

11891189
ExpandAliasResult expandAliasResult =

test/PowerShellEditorServices.Test.E2E/Processes/PsesStdioProcess.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ public class PsesStdioProcess : StdioServerProcess
4343

4444
#region public static properties
4545

46+
// NOTE: Just hard-code this to "powershell" when testing with the code lens.
4647
public static string PwshExe { get; } = Environment.GetEnvironmentVariable("PWSH_EXE_NAME") ?? "pwsh";
4748
public static bool IsWindowsPowerShell { get; } = PwshExe.Contains("powershell");
48-
public static bool RunningInConstainedLanguageMode { get; } =
49+
public static bool RunningInConstrainedLanguageMode { get; } =
4950
Environment.GetEnvironmentVariable("__PSLockdownPolicy", EnvironmentVariableTarget.Machine) != null;
5051

5152
#endregion

0 commit comments

Comments
 (0)