std.os tests: improve robustness of "symlink with relative paths"

This commit is contained in:
Andrew Kelley 2020-08-04 23:45:53 -07:00
parent d159ba9295
commit cf4936bcb0

View File

@ -112,8 +112,11 @@ test "openat smoke test" {
test "symlink with relative paths" {
if (builtin.os.tag == .wasi) return error.SkipZigTest;
const cwd = fs.cwd();
cwd.deleteFile("file.txt") catch {};
cwd.deleteFile("symlinked") catch {};
// First, try relative paths in cwd
var cwd = fs.cwd();
try cwd.writeFile("file.txt", "nonsense");
if (builtin.os.tag == .windows) {