forked from denoland/deno_install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_test.ps1
More file actions
executable file
·38 lines (33 loc) · 1.21 KB
/
install_test.ps1
File metadata and controls
executable file
·38 lines (33 loc) · 1.21 KB
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
31
32
33
34
35
36
37
38
#!/usr/bin/env pwsh
$ErrorActionPreference = 'Stop'
# Test that we can install the latest version at the default location.
Remove-Item "~\.deno" -Recurse -Force -ErrorAction SilentlyContinue
$env:DENO_INSTALL = ""
$v = $null; .\install.ps1
~\.deno\bin\deno.exe --version
Get-ChildItem -Force ~\.deno\bin
~\.deno\bin\dx.cmd -h
# Test that we can install a specific version at a custom location.
Remove-Item "~\deno-1.0.0" -Recurse -Force -ErrorAction SilentlyContinue
$env:DENO_INSTALL = "$Home\deno-1.0.0"
$v = "1.0.0"; .\install.ps1
$DenoVersion = ~\deno-1.0.0\bin\deno.exe --version
if (!($DenoVersion -like '*1.0.0*')) {
throw $DenoVersion
}
# Test that we can install at a relative custom location.
Remove-Item "bin" -Recurse -Force -ErrorAction SilentlyContinue
$env:DENO_INSTALL = "."
$v = "1.1.0"; .\install.ps1
$DenoVersion = bin\deno.exe --version
if (!($DenoVersion -like '*1.1.0*')) {
throw $DenoVersion
}
# Test that the old temp file installer still works.
Remove-Item "~\deno-1.0.1" -Recurse -Force -ErrorAction SilentlyContinue
$env:DENO_INSTALL = "$Home\deno-1.0.1"
$v = $null; .\install.ps1 v1.0.1
$DenoVersion = ~\deno-1.0.1\bin\deno.exe --version
if (!($DenoVersion -like '*1.0.1*')) {
throw $DenoVersion
}