Tests: update-expected-results.ps1 now wipes old tests first

This commit is contained in:
Katy Coe
2020-12-14 02:55:49 +01:00
parent c06461425f
commit 8979625780

View File

@@ -16,6 +16,10 @@ $cpp2 = (gci "$PSScriptRoot/TestBinaries/*/test-cpp-result-1/appdata/*" -Filter
# Get path to expected test results # Get path to expected test results
$results = "$PSScriptRoot/TestExpectedResults" $results = "$PSScriptRoot/TestExpectedResults"
# Wipe existing results
rm -Recurse -Force $results >$null
mkdir $results
$cs | % { $cs | % {
$target = $results + "/" + (Split-Path -Path (Split-Path -Path $_) -Leaf) + ".cs" $target = $results + "/" + (Split-Path -Path (Split-Path -Path $_) -Leaf) + ".cs"
cp $_ -Destination $target -Force cp $_ -Destination $target -Force