handle temp test file better
This commit is contained in:
parent
5d45498f94
commit
757508fb7e
1 changed files with 4 additions and 2 deletions
|
@ -122,7 +122,9 @@ test "pumpIterator" {
|
|||
const file = try fs.cwd().openFile("src/test/two-lines.txt", .{ .read = true, .write = false });
|
||||
defer file.close();
|
||||
|
||||
const output = try fs.cwd().createFile("zig-out/test.txt", .{});
|
||||
const tempFile = "zig-cache/test.txt";
|
||||
|
||||
const output = try fs.cwd().createFile(tempFile, .{});
|
||||
defer output.close();
|
||||
|
||||
var reader = file.reader();
|
||||
|
@ -132,7 +134,7 @@ test "pumpIterator" {
|
|||
|
||||
try pumpIterator(&it, writer, testing.allocator);
|
||||
|
||||
const result = try fs.cwd().openFile("zig-out/test.txt", .{ .read = true });
|
||||
const result = try fs.cwd().openFile(tempFile, .{ .read = true });
|
||||
defer result.close();
|
||||
|
||||
var rit = lineIterator(result.reader(), testing.allocator);
|
||||
|
|
Loading…
Reference in a new issue