aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.ci
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-05-04 09:30:26 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-05-04 09:58:54 +0300
commit0282c2b54f79fa9063e03443369adfe1bc331eaf (patch)
tree58082f641f6eee449b4259d3f7d9d5323bfcfd34 /.ci
parentworkflows/basic: tweak step names (diff)
downloadcmake-common-0282c2b54f79fa9063e03443369adfe1bc331eaf.tar.gz
cmake-common-0282c2b54f79fa9063e03443369adfe1bc331eaf.zip
workflows: add run_foo.ps1, compact YAML
Diffstat (limited to '.ci')
-rw-r--r--.ci/run_foo.ps124
1 files changed, 24 insertions, 0 deletions
diff --git a/.ci/run_foo.ps1 b/.ci/run_foo.ps1
new file mode 100644
index 0000000..578911f
--- /dev/null
+++ b/.ci/run_foo.ps1
@@ -0,0 +1,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'
+}