d2/lib/urlenc/urlenc_test.go
Anmol Sethi 712217050b
compress -> urlenc
And associated cleanup.

Blocked until oss.terrastruct.com/util-go is importable.
2022-12-01 10:06:28 -08:00

23 lines
374 B
Go

package urlenc
import (
"testing"
"oss.terrastruct.com/util-go/assert"
)
func TestBasic(t *testing.T) {
const script = `x -> y
I just forgot my whole philosophy of life!!!: {
s: TV is chewing gum for the eyes
}
`
encoded, err := Encode(script)
assert.Success(t, err)
decoded, err := Decode(encoded)
assert.Success(t, err)
assert.String(t, script, decoded)
}