aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.ci/run_foo.ps1
blob: 578911f9a191e2cb0f99b2924664fcfe3149c978 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
param(
    [Parameter(Mandatory=$true)]
    [string] $FooPath
)

$foo_path = [System.IO.Path]::GetFullPath($FooPath)
if ($IsWindows) {
    $foo_path += '.exe'
}

$relative = 'test.txt'
$absolute = Join-Path (Get-Location).Path $relative

$actual = & $foo_path $relative
echo 'Actual output:'
echo $actual

$expected = $foo_path,$absolute
echo 'Expected output:'
echo $expected

if (Compare-Object $actual $expected -CaseSensitive) {
    throw 'Unexpected output'
}