diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2024-05-02 20:54:48 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-05-03 13:29:22 -0700 |
| commit | b86c4bde64b2c0d01e4d582798ac1b84dd50b99b (patch) | |
| tree | 1e58edebb2bac2b4a7bee4e5d663ea5cb0cbf248 /lib/std/debug.zig | |
| parent | a52f12afc97c5973cfb844be01cf40a9a6fdb57a (diff) | |
| download | zig-b86c4bde64b2c0d01e4d582798ac1b84dd50b99b.tar.gz zig-b86c4bde64b2c0d01e4d582798ac1b84dd50b99b.zip | |
Rename Dir.writeFile2 -> Dir.writeFile and update all callsites
writeFile was deprecated in favor of writeFile2 in f645022d16361865e24582d28f1e62312fbc73bb. This commit renames writeFile2 to writeFile and makes writeFile2 a compile error.
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); |
