package main import ( "bytes" "path" "testing" ) func TestParseFile(t *testing.T) { testCases := []string{ "dim13.sec", "dim13.pub", "test.sig", "kdf.sec", "kdf.pub", } for _, tc := range testCases { t.Run(tc, func(t *testing.T) { f, err := ParseFile(path.Join("testdata", tc)) if err != nil { t.Error(err) } t.Logf("%+v", f) buf := new(bytes.Buffer) f.Encode(buf) t.Logf("%v", buf.String()) }) } }