1
0
Fork 0

Adding upstream version 0.0.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-24 11:27:20 +02:00
parent b74d0ef785
commit 9eac69a0e2
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
41 changed files with 2631 additions and 0 deletions

24
parser_test.go Normal file
View file

@ -0,0 +1,24 @@
package ssh_config
import (
"errors"
"testing"
)
type errReader struct {
}
func (b *errReader) Read(p []byte) (n int, err error) {
return 0, errors.New("read error occurred")
}
func TestIOError(t *testing.T) {
buf := &errReader{}
_, err := Decode(buf, false)
if err == nil {
t.Fatal("expected non-nil err, got nil")
}
if err.Error() != "read error occurred" {
t.Errorf("expected read error msg, got %v", err)
}
}