mirror of
https://github.com/neilotoole/sq.git
synced 2024-12-18 13:41:49 +03:00
db55986980
- Support for ingest cache, download cache, and progress bars.
20 lines
394 B
Go
20 lines
394 B
Go
package checksum_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/neilotoole/sq/libsq/core/ioz/checksum"
|
|
)
|
|
|
|
func TestSum(t *testing.T) {
|
|
got := checksum.Sum(nil)
|
|
require.Equal(t, "", got)
|
|
got = checksum.Sum([]byte{})
|
|
require.Equal(t, "", got)
|
|
got = checksum.Sum([]byte("hello world"))
|
|
assert.Equal(t, "d4a1185", got)
|
|
}
|