-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathgenerate-tests.ps1
More file actions
30 lines (26 loc) · 728 Bytes
/
generate-tests.ps1
File metadata and controls
30 lines (26 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<#
.SYNOPSIS
Generate tests.
.DESCRIPTION
Generate tests based on the latest canonical data.
.PARAMETER Exercise
The slug of the exercise to be analyzed (optional).
.EXAMPLE
The example below will regenerate all tests
PS C:\> ./generate-tests.ps1
.EXAMPLE
The example below will regenerate the tests for the "acronym" exercise
PS C:\> ./generate-tests.ps1 acronym
#>
param (
[Parameter(Position = 0, Mandatory = $false)]
[string]$Exercise
)
# Import shared functionality
. ./shared.ps1
function Update-Tests {
Write-Output "Updating tests"
$args = if ($Exercise) { @("--exercise", $Exercise) } else { @() }
Run-Command "dotnet run --project ./generators $args"
}
Update-Tests