Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAssetFormatTest ¶
func RunAssetFormatTest(t *testing.T, pluginProvider pluginapitester.PluginProvider, assetProvider pluginapitester.AssetProvider, testBaseDir string, testCases []AssetTestCase, )
RunAssetFormatTest tests the "format" operation using the provided asset. Resolves the format plugin using the provided locator and resolver, provides it with the asset and invokes the "format" command for the specified asset.
Types ¶
type AssetTestCase ¶
type AssetTestCase struct { Name string Specs []gofiles.GoFileSpec ConfigFiles map[string]string // Verify specifies whether or not formatter should be run in verify mode. Verify bool Wd string WantError bool WantOutput func(projectDir string) string WantFiles func(specFiles map[string]gofiles.GoFile) map[string]string }
Click to show internal directories.
Click to hide internal directories.