diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:07:31 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2025-12-23 22:15:12 -0800 |
| commit | fa79d346744308250c165519f842fedfc26a1c14 (patch) | |
| tree | 21a007127f3199bca0334c0e959480f5cb7dd0eb /lib/std/testing.zig | |
| parent | 98e9716c082aa7e134e11ed14db8c2f631fedc8a (diff) | |
| download | zig-fa79d346744308250c165519f842fedfc26a1c14.tar.gz zig-fa79d346744308250c165519f842fedfc26a1c14.zip | |
std: add changing cur dir back
There's a good argument to not have this in the std lib but it's more
work to remove it than to leave it in, and this branch is already
20,000+ lines changed.
Diffstat (limited to 'lib/std/testing.zig')
| -rw-r--r-- | lib/std/testing.zig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/std/testing.zig b/lib/std/testing.zig index 5b5ec852e9..9519eeb427 100644 --- a/lib/std/testing.zig +++ b/lib/std/testing.zig @@ -629,6 +629,7 @@ pub const TmpDir = struct { }; pub fn tmpDir(opts: Io.Dir.OpenOptions) TmpDir { + comptime assert(builtin.is_test); var random_bytes: [TmpDir.random_bytes_count]u8 = undefined; std.crypto.random.bytes(&random_bytes); var sub_path: [TmpDir.sub_path_len]u8 = undefined; |
