mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2026-02-10 11:08:33 +00:00
Launcher, app/base, sentry, update service
This commit is contained in:
@ -545,6 +545,20 @@ func TestParseEncodedContentTypeBad(t *testing.T) {
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
type panicReader struct{}
|
||||
|
||||
func (panicReader) Read(p []byte) (int, error) {
|
||||
panic("lol")
|
||||
}
|
||||
|
||||
func TestParsePanic(t *testing.T) {
|
||||
var err error
|
||||
require.NotPanics(t, func() {
|
||||
_, _, _, _, err = Parse(&panicReader{})
|
||||
})
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func getFileReader(filename string) io.Reader {
|
||||
f, err := os.Open(filepath.Join("testdata", filename))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user