(t *testing.T)
| 2035 | } |
| 2036 | |
| 2037 | func TestDecodeBase64_CorrectlyDecodesInputToBytes(t *testing.T) { |
| 2038 | t.Parallel() |
| 2039 | input := "CAAAEA==" |
| 2040 | got, err := script.Echo(input).DecodeBase64().Bytes() |
| 2041 | if err != nil { |
| 2042 | t.Fatal(err) |
| 2043 | } |
| 2044 | want := []byte{8, 0, 0, 16} |
| 2045 | if !bytes.Equal(want, got) { |
| 2046 | t.Logf("input %#v incorrectly decoded:", input) |
| 2047 | t.Error(cmp.Diff(want, got)) |
| 2048 | } |
| 2049 | } |
| 2050 | |
| 2051 | func TestEncodeBase64_CorrectlyEncodesInputBytes(t *testing.T) { |
| 2052 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…