symlinksWork reports whether the OS lets this process create symlinks.
(t *testing.T)
| 10 | |
| 11 | // symlinksWork reports whether the OS lets this process create symlinks. |
| 12 | func symlinksWork(t *testing.T) bool { |
| 13 | t.Helper() |
| 14 | dir := t.TempDir() |
| 15 | target := filepath.Join(dir, "lnk") |
| 16 | if err := os.Symlink(filepath.Join(dir, "src"), target); err != nil { |
| 17 | return false |
| 18 | } |
| 19 | os.Remove(target) |
| 20 | return true |
| 21 | } |
| 22 | |
| 23 | func TestSymlinkInstall(t *testing.T) { |
| 24 | if !symlinksWork(t) { |
no test coverage detected