File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
test/PowerShellEditorServices.Test/Refactoring Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 11
11
using Microsoft . PowerShell . EditorServices . Test . Shared ;
12
12
using Microsoft . PowerShell . EditorServices . Handlers ;
13
13
using Xunit ;
14
- using Microsoft . PowerShell . EditorServices . Refactoring ;
15
14
using System . Management . Automation . Language ;
15
+ using Microsoft . PowerShell . EditorServices . Refactoring ;
16
16
17
17
namespace PowerShellEditorServices . Test . Refactoring
18
18
{
@@ -133,5 +133,21 @@ public void GetCommandParameterAst()
133
133
Assert . Equal ( 10 , symbol . Extent . StartColumnNumber ) ;
134
134
135
135
}
136
+ [ Fact ]
137
+ public void GetFunctionDefinitionAst ( )
138
+ {
139
+ RenameSymbolParams request = new ( ) {
140
+ Column = 12 ,
141
+ Line = 1 ,
142
+ RenameTo = "Renamed" ,
143
+ FileName = "TestDetection.ps1"
144
+ } ;
145
+ ScriptFile scriptFile = GetTestScript ( request . FileName ) ;
146
+
147
+ Ast symbol = Utilities . GetAst ( request . Line , request . Column , scriptFile . ScriptAst ) ;
148
+ Assert . Equal ( 1 , symbol . Extent . StartLineNumber ) ;
149
+ Assert . Equal ( 1 , symbol . Extent . StartColumnNumber ) ;
150
+
151
+ }
136
152
}
137
153
}
You can’t perform that action at this time.
0 commit comments