|
1 | 1 | Describe "ConvertFrom-SourceLineNumber" { |
2 | 2 | # use the integration test code |
| 3 | + BeforeDiscovery { |
| 4 | + $Convert_LineNumber_ModulePath = Convert-Path "$PSScriptRoot/../Integration/Result1/Source1/1.0.0/Source1.psm1" |
| 5 | + $Convert_LineNumber_ModuleSource = Convert-Path "$PSScriptRoot/../Integration/Source1" |
| 6 | + $Convert_LineNumber_ModuleContent = Get-Content $Convert_LineNumber_ModulePath |
| 7 | + ${\} = [io.path]::DirectorySeparatorChar |
| 8 | + |
| 9 | + $TestCases = @( |
| 10 | + @{ |
| 11 | + outputLine = 40; |
| 12 | + sourceFile = ".${\}Private${\}TestUnExportedAliases.ps1"; |
| 13 | + sourceLine = 13; |
| 14 | + Module = $Convert_LineNumber_ModulePath |
| 15 | + } |
| 16 | + @{ |
| 17 | + outputLine = 48; |
| 18 | + sourceFile = ".${\}Public${\}Get-Source.ps1"; |
| 19 | + sourceLine = 5; |
| 20 | + Module = $Convert_LineNumber_ModulePath |
| 21 | + } |
| 22 | + @{ |
| 23 | + outputLine = 56; |
| 24 | + sourceFile = ".${\}Public${\}Set-Source.ps1"; |
| 25 | + sourceLine = 3; |
| 26 | + Module = $Convert_LineNumber_ModulePath |
| 27 | + } |
| 28 | + ) |
| 29 | + } |
3 | 30 | BeforeAll { |
4 | 31 | Build-Module $PSScriptRoot/../Integration/Source1/build.psd1 -Passthru |
5 | 32 | Push-Location $PSScriptRoot -StackName ConvertFrom-SourceLineNumber |
6 | 33 |
|
7 | | - $global:Convert_LineNumber_ModulePath = Convert-Path "$PSScriptRoot/../Integration/Result1/Source1/1.0.0/Source1.psm1" |
8 | | - $global:Convert_LineNumber_ModuleSource = Convert-Path "$PSScriptRoot/../Integration/Source1" |
9 | | - $global:Convert_LineNumber_ModuleContent = Get-Content $global:Convert_LineNumber_ModulePath |
10 | | - ${global:\} = [io.path]::DirectorySeparatorChar |
11 | | - |
12 | | - $global:TestCases = @( |
13 | | - @{ outputLine = 40; sourceFile = ".${\}Private${\}TestUnExportedAliases.ps1"; sourceLine = 13; Module = $Convert_LineNumber_ModulePath } |
14 | | - @{ outputLine = 48; sourceFile = ".${\}Public${\}Get-Source.ps1"; sourceLine = 5; Module = $Convert_LineNumber_ModulePath } |
15 | | - @{ outputLine = 56; sourceFile = ".${\}Public${\}Set-Source.ps1"; sourceLine = 3; Module = $Convert_LineNumber_ModulePath } |
16 | | - ) |
| 34 | + $Convert_LineNumber_ModulePath = Convert-Path "$PSScriptRoot/../Integration/Result1/Source1/1.0.0/Source1.psm1" |
| 35 | + $Convert_LineNumber_ModuleSource = Convert-Path "$PSScriptRoot/../Integration/Source1" |
| 36 | + $Convert_LineNumber_ModuleContent = Get-Content $Convert_LineNumber_ModulePath |
| 37 | + ${\} = [io.path]::DirectorySeparatorChar |
17 | 38 | } |
18 | 39 | AfterAll { |
19 | 40 | Pop-Location -StackName ConvertFrom-SourceLineNumber |
|
0 commit comments