aboutsummaryrefslogtreecommitdiff
path: root/lib/std/testing.zig
diff options
context:
space:
mode:
authorCody Tapscott <topolarity@tapscott.me>2022-03-02 23:21:55 -0700
committerCody Tapscott <topolarity@tapscott.me>2022-03-03 14:31:49 -0700
commitade2d0c6a28009ac505b4863079ede3ba64fcdd1 (patch)
tree9a6a203309c5a601fe6067bf7e8e442822066a45 /lib/std/testing.zig
parent58f961f4cb9875bbce3070969438ecf08f392c9f (diff)
downloadzig-ade2d0c6a28009ac505b4863079ede3ba64fcdd1.tar.gz
zig-ade2d0c6a28009ac505b4863079ede3ba64fcdd1.zip
stdlib WASI: Add realpath() support for non-absolute Preopens
Diffstat (limited to 'lib/std/testing.zig')
-rw-r--r--lib/std/testing.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig
index 8e5a75feb7..8d08792801 100644
--- a/lib/std/testing.zig
+++ b/lib/std/testing.zig
@@ -327,8 +327,8 @@ fn getCwdOrWasiPreopen() std.fs.Dir {
defer preopens.deinit();
preopens.populate() catch
@panic("unable to make tmp dir for testing: unable to populate preopens");
- const preopen = preopens.find(std.fs.wasi.PreopenType{ .Dir = "/cwd" }) orelse
- @panic("unable to make tmp dir for testing: didn't find '/cwd' in the preopens");
+ const preopen = preopens.find(std.fs.wasi.PreopenType{ .Dir = "." }) orelse
+ @panic("unable to make tmp dir for testing: didn't find '.' in the preopens");
return std.fs.Dir{ .fd = preopen.fd };
} else {