Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestFile ¶ added in v0.98.0
TestFile creates a temporary file with the given filename, data and with the default permissions. The directory is automatically removed when the test and all its subtests complete. Each subsequent call to t.TempDir returns a unique directory.
func TestFileWithCustomPermissions ¶ added in v1.0.5
func TestFileWithCustomPermissions(t *testing.T, filename string, data []byte, perms fs.FileMode) string
TestFileWithCustomPermissions creates a temporary file with the given filename and permissions. The directory is automatically removed when the test and all its subtests complete. Each subsequent call to t.TempDir returns a unique directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.