Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue 25 md5s #26

Merged
merged 10 commits into from
Jun 1, 2021
Prev Previous commit
Next Next commit
fix: test for issue 25
KEINOS committed Jun 1, 2021

Unverified

This user has not yet uploaded their public signing key.
commit 609d0bab790988fb9cb9b6ca9b0566ea65adb7c6
13 changes: 10 additions & 3 deletions tests/issues/issue25_test.sh
Original file line number Diff line number Diff line change
@@ -2,11 +2,18 @@

# md5s は md5sum/md5 のラッパー関数です.
md5s() {
if [ -e md5sum ]; then
echo "$1" | md5sum
elif [ -e md5 ]; then
if [ -e "$(which md5sum)" ]; then
echo "$1" | md5sum | awk '{ print $1 }'
return $?
fi

if [ -e "$(which md5)" ]; then
md5 -q -s "$1"
return $?
fi

echo >&2 'MD5 ハッシュ関数がありません。'
exit 1
}

Describe 'md5s'