# std/fs/test.zig: Factor out the symlink-creation wrappers · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/c36962bb197abf66e2eb94068dc2a53b098fff9d)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: c36962bb197abf66e2eb94068dc2a53b098fff9d

Requested commit: c36962bb197abf66e2eb94068dc2a53b098fff9d

Commit: c36962bb197abf66e2eb94068dc2a53b098fff9d

Tree: f846328b69fc84059424a72924d82525be5b257b

Author: Pat Tullmann

Committer: Pat Tullmann

## Message

```
std/fs/test.zig: Factor out the symlink-creation wrappers

Because creation of a symlink can fail on Windows with an Access Denied
error (https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links)
any tests that need a symbolic link "skip" if they run into this problem.

This change factors out a "setupSymbolicLink()" routine to make this
clearer, a bit tighter, and easier to use in future tests.

I also collapsed the "symlink in parent directory" test into the existing
"Dir.readlink" test, because the latter uses the more comprehensive
testWithAllSupportedPathTypes wrapper.

```

## Parents

- [95a0e127b3f9528d25e0aefefc238d082a57bdc3](https://git.cafe/gitcafe/zig/commit/95a0e127b3f9528d25e0aefefc238d082a57bdc3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/c36962bb197abf66e2eb94068dc2a53b098fff9d?format=markdown)
