zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 399f6b77c40d5ebd1d54ad193a70f1935c1ebdfc (tree)
parent b216d8de886b1d3b3cebb279864ec6bc91216d3e
Author: Ryan Liptak <squeek502@hotmail.com>
Date:   Sat, 20 Jun 2020 22:21:23 -0700

Add 'no changes' test to zig fmt cli test

Diffstat:
Mtest/cli.zig | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/test/cli.zig b/test/cli.zig @@ -165,4 +165,8 @@ fn testZigFmt(zig_exe: []const u8, dir_path: []const u8) !void { // running it on the dir, only the new file should be changed testing.expect(std.mem.startsWith(u8, run_result2.stderr, fmt2_zig_path)); testing.expect(run_result2.stderr.len == fmt2_zig_path.len + 1 and run_result2.stderr[run_result2.stderr.len - 1] == '\n'); + + const run_result3 = try exec(dir_path, &[_][]const u8{ zig_exe, "fmt", dir_path }); + // both files have been formatted, nothing should change now + testing.expect(run_result3.stderr.len == 0); }