File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -150,6 +150,17 @@ Describe "Test importing correct customized rules" {
150
150
$customizedRulePath.Count | Should Be 1
151
151
}
152
152
153
+ It " will set ScriptName property to the target file name" {
154
+ $violations = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomizedRulePath $directory \samplerule
155
+ $violations [0 ].ScriptName | Should Be ' TestScript.ps1'
156
+ }
157
+
158
+ It " will set ScriptPath property to the target file path" {
159
+ $violations = Invoke-ScriptAnalyzer $directory \TestScript.ps1 - CustomizedRulePath $directory \samplerule
160
+ $expectedScriptPath = Join-Path $directory ' TestScript.ps1'
161
+ $violations [0 ].ScriptPath | Should Be $expectedScriptPath
162
+ }
163
+
153
164
if (! $testingLibraryUsage )
154
165
{
155
166
It " will show the custom rule in the results when given a rule folder path with trailing backslash" {
You can’t perform that action at this time.
0 commit comments