@@ -51,15 +51,15 @@ function Enable-All-UnitTests($BuildDir) {
5151function Test-Refactoring-Projects ($PracticeExercisesDir ) {
5252 Write-Output " Testing refactoring projects"
5353 @ (" tree-building" , " ledger" , " markdown" ) | ForEach-Object {
54- Invoke-Tests - Path " $PracticeExercisesDir / $_ "
54+ Invoke-Tests - Path " ${ PracticeExercisesDir} / ${_} "
5555 }
5656}
5757
5858function Set-ExampleImplementation {
5959 [CmdletBinding (SupportsShouldProcess )]
6060 param ($ExercisesDir , $ReplaceFileName )
6161
62- if ($PSCmdlet.ShouldProcess (" Exercise $ReplaceFileName " , " replace solution with example" )) {
62+ if ($PSCmdlet.ShouldProcess (" Exercise ${ ReplaceFileName} " , " replace solution with example" )) {
6363 Get-ChildItem - Path $ExercisesDir - Include " *.csproj" - Recurse | ForEach-Object {
6464 $stub = Join-Path - Path $_.Directory ($_.BaseName + " .cs" )
6565 $example = Join-Path - Path $_.Directory " .meta" $ReplaceFileName
@@ -88,14 +88,14 @@ function Test-ExerciseImplementation($Exercise, $BuildDir, $ConceptExercisesDir,
8888 if (-Not $Exercise ) {
8989 Invoke-Tests - Path $BuildDir - IsCI $IsCI
9090 }
91- elseif (Test-Path " $ConceptExercisesDir / $ Exercise" ) {
92- Invoke-Tests - Path " $ConceptExercisesDir / $ Exercise" - IsCI $IsCI
91+ elseif (Test-Path " ${ ConceptExercisesDir} / ${ Exercise} " ) {
92+ Invoke-Tests - Path " ${ ConceptExercisesDir} / ${ Exercise} " - IsCI $IsCI
9393 }
94- elseif (Test-Path " $PracticeExercisesDir / $ Exercise" ) {
95- Invoke-Tests - Path " $PracticeExercisesDir / $ Exercise" - IsCI $IsCI
94+ elseif (Test-Path " ${ PracticeExercisesDir} / ${ Exercise} " ) {
95+ Invoke-Tests - Path " ${ PracticeExercisesDir} / ${ Exercise} " - IsCI $IsCI
9696 }
9797 else {
98- throw " Could not find exercise '$Exercise '"
98+ throw " Could not find exercise '${ Exercise} '"
9999 }
100100}
101101
@@ -107,14 +107,14 @@ function Invoke-Tests($Path, $IsCI) {
107107 & dotnet test $Path -- logger " junit;LogFilePath=results/test.xml"
108108 }
109109 else {
110- & dotnet test " $Path "
110+ & dotnet test $Path
111111 }
112112}
113113
114114
115- $buildDir = Join-Path $ PSScriptRoot " build"
116- $practiceExercisesDir = Join-Path $ buildDir " practice"
117- $conceptExercisesDir = Join-Path $ buildDir " concept"
115+ $buildDir = " ${ PSScriptRoot} / build"
116+ $practiceExercisesDir = " ${ buildDir} / practice"
117+ $conceptExercisesDir = " ${ buildDir} / concept"
118118$sourceDir = Resolve-Path " exercises"
119119$isCi = [System.Convert ]::ToBoolean($env: CI )
120120
0 commit comments