nvm/test/fast/Unit tests/nvm_get_checksum_alg

21 lines
272 B
Plaintext
Raw Permalink Normal View History

2016-08-10 13:24:09 +08:00
#!/bin/sh
set -ex
die () { echo "$@" ; exit 1; }
2016-08-10 13:24:09 +08:00
set +e # TODO: fix
\. ../../../nvm.sh
set -e
2016-08-10 13:24:09 +08:00
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