aboutsummaryrefslogtreecommitdiff
path: root/test/cli.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2020-09-30 01:31:08 -0400
committerAndrew Kelley <andrew@ziglang.org>2020-09-30 01:31:08 -0400
commit14d6d07af2ce37569bce8b148599e31664de5f12 (patch)
tree83e2fb2a68b820cf1cbb030d6b6b2880ec383d9d /test/cli.zig
parent839bdfdc93b1d2a2a4ed6f7c9ca3155323242d82 (diff)
downloadzig-14d6d07af2ce37569bce8b148599e31664de5f12.tar.gz
zig-14d6d07af2ce37569bce8b148599e31664de5f12.zip
fix the cli test expected string to support native path separators
Diffstat (limited to 'test/cli.zig')
-rw-r--r--test/cli.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cli.zig b/test/cli.zig
index edb87cc750..7a0a7d6459 100644
--- a/test/cli.zig
+++ b/test/cli.zig
@@ -145,7 +145,9 @@ fn testMissingOutputPath(zig_exe: []const u8, dir_path: []const u8) !void {
const output_arg = try std.fmt.allocPrint(a, "-femit-bin={s}", .{output_path});
const source_path = try fs.path.join(a, &[_][]const u8{ "src", "main.zig" });
const result = try exec(dir_path, false, &[_][]const u8{ zig_exe, "build-exe", source_path, output_arg });
- testing.expect(std.mem.eql(u8, result.stderr, "error: unable to open output directory 'does/not/exist': FileNotFound\n"));
+ const s = std.fs.path.sep_str;
+ const expected: []const u8 = "error: unable to open output directory 'does" ++ s ++ "not" ++ s ++ "exist': FileNotFound\n";
+ testing.expectEqualStrings(expected, result.stderr);
}
fn testZigFmt(zig_exe: []const u8, dir_path: []const u8) !void {