From 16c54990989fa8b25038536b04d2ec6cf99e2e1c Mon Sep 17 00:00:00 2001 From: LeRoyce Pearson Date: Sun, 8 Mar 2020 15:13:40 -0600 Subject: [PATCH] Remove up files created in test at end of test --- lib/std/cache_hash.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/std/cache_hash.zig b/lib/std/cache_hash.zig index 88b3e61cd..bb5b4b710 100644 --- a/lib/std/cache_hash.zig +++ b/lib/std/cache_hash.zig @@ -319,9 +319,10 @@ fn hash_file(alloc: *Allocator, bin_digest: []u8, handle: *const fs.File) !void test "cache file and the recall it" { const cwd = fs.cwd(); + const temp_file = "test.txt"; const temp_manifest_dir = "temp_manifest_dir"; - try cwd.writeFile("test.txt", "Hello, world!\n"); + try cwd.writeFile(temp_file, "Hello, world!\n"); var digest1: [BASE64_DIGEST_LEN]u8 = undefined; var digest2: [BASE64_DIGEST_LEN]u8 = undefined; @@ -356,4 +357,5 @@ test "cache file and the recall it" { debug.assert(mem.eql(u8, digest1[0..], digest2[0..])); try cwd.deleteTree(temp_manifest_dir); + try cwd.deleteFile(temp_file); }