aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-08-27 02:40:47 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-08-27 12:18:42 +0300
commit46bd332aa99a684b2e4f310c1a3ffa713a49d901 (patch)
treed870cc7e768711f0bd487d3361a609cc54d12ed8
parentAppVeyor: use choco to install stack (diff)
downloadwindows-env-46bd332aa99a684b2e4f310c1a3ffa713a49d901.tar.gz
windows-env-46bd332aa99a684b2e4f310c1a3ffa713a49d901.zip
AppVeyor: add some basic tests
-rw-r--r--.appveyor.yml16
1 files changed, 16 insertions, 0 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 5949ed1..4c58602 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -2,6 +2,8 @@ version: '{build}'
environment:
install_dir: C:\Projects\install\windows-env
+ global_env: HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
+ user_env: HKCU:\Environment
platform:
- i386
@@ -25,3 +27,17 @@ build_script:
after_build:
- 7z.exe a "%APPVEYOR_PROJECT_NAME%-%PLATFORM%.zip" "%install_dir%"
- appveyor.exe PushArtifact "%APPVEYOR_PROJECT_NAME%-%PLATFORM%.zip"
+
+# I a PS noob, don't know a simpler/more elegant way :-(
+test_script:
+ - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
+ - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb")
+ - '"%install_dir%\addpath.exe" -y C:\dumb'
+ - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
+ - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb")
+ - '"%install_dir%\addpath.exe" -g -y C:\dumb'
+ - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "Global PATH should contain C:\dumb")
+ - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -or $(throw "User PATH should contain C:\dumb")
+ - '"%install_dir%\delpath.exe" -g -y C:\dumb'
+ - ps: $((Get-ItemProperty $env:global_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "Global PATH shouldn't contain C:\dumb")
+ - ps: $((Get-ItemProperty $env:user_env).PATH.Split(';') | Select-String -Pattern '^C:\\dumb$' -Quiet) -and $(throw "User PATH shouldn't contain C:\dumb")