Documentation ¶
Index ¶
- func AnyFeature(tb testing.TB, given *flag.IncludeExcludeStringSet, want ...string)
- func Binary(tb testing.TB, binary string) string
- func BinaryInPath(tb testing.TB, binary string) string
- func Features(tb testing.TB, given *flag.IncludeExcludeStringSet, want ...string)
- func File(tb testing.TB, path, file string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyFeature ¶
func AnyFeature(tb testing.TB, given *flag.IncludeExcludeStringSet, want ...string)
AnyFeature checks if at least one of the features are enabled.
See Features for more information.
func Binary ¶
Binary checks if `binary` exists in the same directory as the test binary. Returns full binary path if it exists, otherwise, skips the test.
func BinaryInPath ¶
Binary tries to locate `binary` in the PATH (or the current working directory), or the same the same directory as the currently-executing binary.
Returns full binary path if it exists, otherwise, skips the test.
func Features ¶
func Features(tb testing.TB, given *flag.IncludeExcludeStringSet, want ...string)
Features checks the wanted features are present in given, and skips the test if any are missing or explicitly excluded. If the given set is empty, the function returns (by default, all features are enabled).
See flag.NewFeatureFlag and flag.IncludeExcludeStringSet for more details.
Types ¶
This section is empty.