-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.ps1
More file actions
12 lines (10 loc) · 732 Bytes
/
Copy pathrun.ps1
File metadata and controls
12 lines (10 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
param(
[string] $ApplicationFilePath
)
if([string]::IsNullOrEmpty($ApplicationFilePath)) {
$ApplicationFilePath = (Join-Path -Path $PSScriptRoot -ChildPath "../src/RemoveSingleInstanceCharacters/bin/Debug/net8.0/RemoveSingleInstanceCharacters$(if($IsWindows) { '.exe' } else { [string]::Empty })")
}
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'NoSingleInstanceCharacters')
$opaProcess = Start-OpenPolicyAgent -PolicyDirectoryPath (Join-Path -Path $PSScriptRoot -ChildPath '../policy/no_single_instance_characters')
(Import-Test -TestsFilePath (Join-Path -Path $PSScriptRoot -ChildPath 'test_arguments.json')).tests | Test-Application -ApplicationFilePath $ApplicationFilePath
$opaProcess | Stop-Process