2023-10-25 23:52:01 +00:00
|
|
|
package utils
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
2023-11-03 23:38:31 +00:00
|
|
|
func TestCalculatePartialMD5(t *testing.T) {
|
2023-10-25 23:52:01 +00:00
|
|
|
partialMD5, err := CalculatePartialMD5("../_test_files/alice.epub")
|
|
|
|
|
|
|
|
want := "386d1cb51fe4a72e5c9fdad5e059bad9"
|
|
|
|
if partialMD5 != want {
|
|
|
|
t.Fatalf(`Expected: %v, Got: %v, Error: %v`, want, partialMD5, err)
|
|
|
|
}
|
|
|
|
}
|