- Relocated testfixtures from the root to the internal package for better encapsulation. - Updated import paths in codec test files across env, ini, json, yaml directories to reflect the new location. - Removed the now obsolete testfixtures.go file.
17 lines
313 B
Go
17 lines
313 B
Go
package yaml
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/eslider/go-config/internal/testfixtures"
|
|
)
|
|
|
|
func TestCodec_InvalidYAML(t *testing.T) {
|
|
c := New(WithBytes(testfixtures.Load(t, "invalid", "malformed.yaml")))
|
|
_, err := c.Map(context.Background())
|
|
if err == nil {
|
|
t.Fatal("expected parse error")
|
|
}
|
|
}
|