initial
Some checks are pending
CI Tests / dotnet (push) Waiting to run
CI Tests / dotnet-1 (push) Waiting to run
CI Tests / dotnet-2 (push) Waiting to run
Emacs End-to-End Tests / ert (push) Waiting to run
Vim End-to-End Tests / themis (push) Waiting to run

This commit is contained in:
fwastring 2026-02-17 13:06:31 +01:00
commit baa0056244
352 changed files with 47928 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# This file represents a script with a DSC configuration
configuration AConfiguration {
Node "TEST-PC" {}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInDSCFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/DSCFile.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInMultiSymbolFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/MultipleSymbols.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInNewLineSymbolFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/NewLineSymbols.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInNoSymbolsFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/NoSymbols.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInPSDFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/PowerShellDataFile.psd1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInPSKoansFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/PesterFile.Koans.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using Microsoft.PowerShell.EditorServices.Services.TextDocument;
namespace Microsoft.PowerShell.EditorServices.Test.Shared.Symbols
{
public static class FindSymbolsInPesterFile
{
public static readonly ScriptRegion SourceDetails =
new(
file: TestUtilities.NormalizePath("Symbols/PesterFile.tests.ps1"),
text: string.Empty,
startLineNumber: 0,
startColumnNumber: 0,
startOffset: 0,
endLineNumber: 0,
endColumnNumber: 0,
endOffset: 0);
}
}

View file

@ -0,0 +1,56 @@
$Global:GlobalVar = 0
$UnqualifiedScriptVar = 1
$Script:ScriptVar2 = 2
"`$Script:ScriptVar2 is $Script:ScriptVar2"
function script:AFunction {}
filter AFilter {$_}
function AnAdvancedFunction {
begin {
$LocalVar = 'LocalVar'
function ANestedFunction() {
$nestedVar = 42
"`$nestedVar is $nestedVar"
}
}
process {}
end {}
}
workflow AWorkflow {}
class AClass {
[string]$AProperty
AClass([string]$AParameter) {
}
[void]AMethod([string]$param1, [int]$param2, $param3) {
}
}
enum AEnum {
AValue = 0
}
AFunction
1..3 | AFilter
AnAdvancedFunction
<#
#region don't find me inside comment block
abc
#endregion
#>
#region find me outer
#region find me inner
#endregion
#endregion
#region ignore this unclosed region

View file

@ -0,0 +1,28 @@
function
returnTrue {
$true
}
class
NewLineClass {
NewLineClass() {
}
static
hidden
[string]
$SomePropWithDefault = 'some value'
static
hidden
[string]
MyClassMethod([MyNewLineEnum]$param1) {
return 'hello world $param1'
}
}
enum
MyNewLineEnum {
First
}

View file

@ -0,0 +1 @@
# This file represents a script with no symbols

View file

@ -0,0 +1,23 @@
Describe "Testing Pester symbols in a PSKoans-file" {
Context "Simple demo" {
BeforeAll {
}
BeforeEach {
}
It "Should return Pester symbols" {
}
AfterEach {
}
}
AfterAll {
}
}

View file

@ -0,0 +1,43 @@
BeforeDiscovery {
}
BeforeAll {
}
Describe "Testing Pester symbols" {
Context "When a Pester file is given" {
BeforeAll {
}
BeforeEach {
}
It "Should return it symbols" {
}
It "Should return context symbols" {
}
It "Should return describe symbols" {
}
It "Should return setup and teardown symbols" {
}
AfterEach {
}
}
AfterAll {
}
}

View file

@ -0,0 +1,5 @@
@{
property1 = "value1"
property2 = "value2"
property3 = "value3"
}