diff options
Diffstat (limited to 'lib/std/debug.zig')
| -rw-r--r-- | lib/std/debug.zig | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/std/debug.zig b/lib/std/debug.zig index 09de1f5930..ae82e76f1a 100644 --- a/lib/std/debug.zig +++ b/lib/std/debug.zig @@ -1524,7 +1524,7 @@ test printLineFromFileAnyOs { { const path = try join(allocator, &.{ test_dir_path, "one_line.zig" }); defer allocator.free(path); - try test_dir.dir.writeFile("one_line.zig", "no new lines in this file, but one is printed anyway"); + try test_dir.dir.writeFile(.{ .sub_path = "one_line.zig", .data = "no new lines in this file, but one is printed anyway" }); try expectError(error.EndOfFile, printLineFromFileAnyOs(output_stream, .{ .file_name = path, .line = 2, .column = 0 })); @@ -1535,11 +1535,14 @@ test printLineFromFileAnyOs { { const path = try fs.path.join(allocator, &.{ test_dir_path, "three_lines.zig" }); defer allocator.free(path); - try test_dir.dir.writeFile("three_lines.zig", + try test_dir.dir.writeFile(.{ + .sub_path = "three_lines.zig", + .data = \\1 \\2 \\3 - ); + , + }); try printLineFromFileAnyOs(output_stream, .{ .file_name = path, .line = 1, .column = 0 }); try expectEqualStrings("1\n", output.items); |
