pkger/pkging/embed/embed_test.go

23 lines
282 B
Go
Raw Permalink Normal View History

2019-10-25 17:19:27 +03:00
package embed
import (
"testing"
"github.com/stretchr/testify/require"
)
func Test_Encoding(t *testing.T) {
r := require.New(t)
in := []byte("hi\n")
enc, err := Encode(in)
r.NoError(err)
r.NotEqual(in, enc)
dec, err := Decode(enc)
r.NoError(err)
r.Equal(in, dec)
}