MCPcopy
hub / github.com/bitfield/script / TestEncodeBase64_CorrectlyEncodes

Function TestEncodeBase64_CorrectlyEncodes

script_test.go:1983–1997  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1981}
1982
1983func TestEncodeBase64_CorrectlyEncodes(t *testing.T) {
1984 t.Parallel()
1985 for _, tc := range base64Cases {
1986 t.Run(tc.name, func(t *testing.T) {
1987 got, err := script.Echo(tc.decoded).EncodeBase64().String()
1988 if err != nil {
1989 t.Fatal(err)
1990 }
1991 if got != tc.encoded {
1992 t.Logf("input %q incorrectly encoded:", tc.decoded)
1993 t.Error(cmp.Diff(tc.encoded, got))
1994 }
1995 })
1996 }
1997}
1998
1999func TestDecodeBase64_CorrectlyDecodes(t *testing.T) {
2000 t.Parallel()

Callers

nothing calls this directly

Calls 4

EchoFunction · 0.92
StringMethod · 0.80
EncodeBase64Method · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…