Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
iaalm committed Mar 9, 2023
1 parent 28845f5 commit 3fae975
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Units/parser-powershell.r/simple-powershell.d/expected.tags
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ ErrorActionPreference input.ps1 /^$ErrorActionPreference = "Stop"$/;" v
Settings input.ps1 /^$Global:Settings = $null$/;" v
ALocalVar input.ps1 /^$Local:ALocalVar = $null$/;" v
BasePath input.ps1 /^$BasePath = split-path -parent $Global:MyInvocation.InvocationName$/;" v
cDrive input.ps1 /^$cDrive="C:\\"$/;" v
nextLine input.ps1 /^$nextLine="`n"$/;" v
backtick input.ps1 /^$backtick='`'$/;" v
Read-Configuration-File input.ps1 /^FUNCTION Read-Configuration-File() {$/;" f signature:()
LogMessageOK input.ps1 /^Function LogMessageOK()$/;" f signature:()
LogMessage input.ps1 /^function LogMessage() {$/;" f signature:()
Expand Down
8 changes: 4 additions & 4 deletions Units/parser-powershell.r/simple-powershell.d/input.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ $Local:ALocalVar = $null
# a usual variable
$BasePath = split-path -parent $Global:MyInvocation.InvocationName

# different type of escape in string
$cDrive="C:\"
$nextLine="`n"
$backtick='`'

FUNCTION Read-Configuration-File() {
$Hostname = [System.Environment]::MachineName
Expand Down Expand Up @@ -79,10 +83,6 @@ function LoadTemplate($template) {
# woah, this is real magic,
# see http://stackoverflow.com/questions/10754582/string-interpolation-of-hashtable-values-in-powershell

$cDrive="C:\"
$nextLine="`n"
$nextLine='`'

# Set all unbound variables (@args) in the local context
while ($args)
{
Expand Down

0 comments on commit 3fae975

Please sign in to comment.