mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
* Update package version * Update makefile targets * Update readme packages * Remaining old packages via rg/sd
25 lines
618 B
Go
25 lines
618 B
Go
package bifs
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
|
|
"github.com/johnkerl/miller/v6/pkg/mlrval"
|
|
)
|
|
|
|
func TestBIF_md5(t *testing.T) {
|
|
input1 := mlrval.FromDeferredType("")
|
|
output := BIF_md5(input1)
|
|
stringval, ok := output.GetStringValue()
|
|
assert.True(t, ok)
|
|
assert.Equal(t, "d41d8cd98f00b204e9800998ecf8427e", stringval)
|
|
|
|
input1 = mlrval.FromDeferredType("miller")
|
|
output = BIF_md5(input1)
|
|
stringval, ok = output.GetStringValue()
|
|
assert.True(t, ok)
|
|
assert.Equal(t, "f0af962ddbc82430e947390b2f3f6e49", stringval)
|
|
}
|
|
|
|
// TODO: copy in more unit-test cases from existing regression-test data
|