mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2025-11-30 21:33:27 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
851e100d15 |
@@ -243,14 +243,14 @@ Describe 'cache_path' -Tag 'Scoop' {
|
||||
$ret = cache_path 'git' '2.44.0' $url
|
||||
$inputStream = [System.IO.MemoryStream]::new([System.Text.Encoding]::UTF8.GetBytes($url))
|
||||
$sha = (Get-FileHash -Algorithm SHA256 -InputStream $inputStream).Hash.ToLower().Substring(0, 7)
|
||||
$ret | Should -Be "$cachedir\git#2.44.0#$sha.zip"
|
||||
$ret | Should -Be (Join-Path $cachedir "git#2.44.0#$sha.zip")
|
||||
}
|
||||
|
||||
# # NOTE: Remove this 6 months after the feature ships.
|
||||
It 'returns the old format cache path for a given input' {
|
||||
Mock Test-Path { $true }
|
||||
$ret = cache_path 'git' '2.44.0' 'https://example.com/git.zip'
|
||||
$ret | Should -Be "$cachedir\git#2.44.0#https_example.com_git.zip"
|
||||
$ret | Should -Be (Join-Path $cachedir 'git#2.44.0#https_example.com_git.zip')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user