[Refactor] remove unused nvm_checksum function

This commit is contained in:
Jordan Harband
2020-07-31 22:10:28 -07:00
parent 3561bbc54a
commit abfe0a5891
2 changed files with 1 additions and 62 deletions

View File

@@ -1,18 +0,0 @@
#!/bin/sh
cleanup () {
rm tmp/emptyfile tmp/testfile
rmdir tmp
}
die () { echo "$@" ; cleanup; exit 1; }
\. ../../../nvm.sh
mkdir -p tmp
touch tmp/emptyfile
echo -n "test" > tmp/testfile
nvm_checksum tmp/emptyfile "da39a3ee5e6b4b0d3255bfef95601890afd80709" || die "nvm_checksum on an empty file did not match the SHA1 digest of the empty string"
nvm_checksum tmp/testfile "da39a3ee5e6b4b0d3255bfef95601890afd80709" && die "nvm_checksum allowed a bad checksum"
cleanup