Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assert/yaml/yaml_custom.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build testify_yaml_custom && !testify_yaml_fail && !testify_yaml_default
//go:build testify_yaml_custom && !testify_yaml_fail && !testify_yaml_default && !testify_no_deps

// Package yaml is an implementation of YAML functions that calls a pluggable implementation.
//
Expand Down
4 changes: 2 additions & 2 deletions assert/yaml/yaml_default.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//go:build !testify_yaml_fail && !testify_yaml_custom
//go:build !testify_yaml_fail && !testify_yaml_custom && !testify_no_deps

// Package yaml is just an indirection to handle YAML deserialization.
//
Expand All @@ -10,7 +10,7 @@
//
// Alternative implementations are selected using build tags:
//
// - testify_yaml_fail: [Unmarshal] always fails with an error
// - testify_yaml_fail or testify_no_deps: [Unmarshal] always fails with an error
// - testify_yaml_custom: [Unmarshal] is a variable. Caller must initialize it
// before calling any of [github.com/stretchr/testify/assert.YAMLEq] or
// [github.com/stretchr/testify/assert.YAMLEqf].
Expand Down
6 changes: 5 additions & 1 deletion assert/yaml/yaml_fail.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
//go:build testify_yaml_fail && !testify_yaml_custom && !testify_yaml_default
//go:build (testify_no_deps || testify_yaml_fail) && !testify_yaml_custom && !testify_yaml_default

// Package yaml is an implementation of YAML functions that always fail.
//
// This implementation can be used at build time to replace the default implementation
// to avoid linking with [gopkg.in/yaml.v3]:
//
// go test -tags testify_yaml_fail
//
// or:
//
// go test -tags testify_no_deps
package yaml

import "errors"
Expand Down