mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-28 04:31:35 +00:00
Add nvm_get_checksum_alg
This commit is contained in:
18
test/fast/Unit tests/nvm_get_checksum_alg
Executable file
18
test/fast/Unit tests/nvm_get_checksum_alg
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -ex
|
||||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
ALG="$(nvm_get_checksum_alg)"
|
||||
|
||||
case "$ALG" in
|
||||
'sha-256' | 'sha-1')
|
||||
echo 'sha-256 or sha-1 found'
|
||||
;;
|
||||
*)
|
||||
die "sha-256 or sha-1 not found: found ${ALG}"
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user