MCPcopy
hub / github.com/stretchr/testify / getTempSymlinkPath

Function getTempSymlinkPath

assert/assertions_test.go:2623–2632  ·  assert/assertions_test.go::getTempSymlinkPath
(t *testing.T, file string)

Source from the content-addressed store, hash-verified

2621}
2622
2623func getTempSymlinkPath(t *testing.T, file string) string {
2624 t.Helper()
2625
2626 tempDir := t.TempDir()
2627 link := filepath.Join(tempDir, file+"_symlink")
2628 if err := os.Symlink(file, link); err != nil {
2629 t.Fatalf("could not create temp symlink %q pointing to %q: %v", link, file, err)
2630 }
2631 return link
2632}
2633
2634func TestDirExists(t *testing.T) {
2635 t.Parallel()

Callers 4

TestFileExistsFunction · 0.85
TestNoFileExistsFunction · 0.85
TestDirExistsFunction · 0.85
TestNoDirExistsFunction · 0.85

Calls 1

HelperMethod · 0.65

Tested by

no test coverage detected