diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2020-12-08 21:54:46 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-08 21:59:24 -0700 |
| commit | 4592fd26b937d8c7ff91295408d8377c1c13cf53 (patch) | |
| tree | f310569348c6115b0995eec2aeaa21ff3b111c5c /test/cli.zig | |
| parent | 72f6c6e6345030392a3f8cac79862d58359f1e76 (diff) | |
| download | zig-4592fd26b937d8c7ff91295408d8377c1c13cf53.tar.gz zig-4592fd26b937d8c7ff91295408d8377c1c13cf53.zip | |
add std.testing.expectStringEndsWith
Diffstat (limited to 'test/cli.zig')
| -rw-r--r-- | test/cli.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cli.zig b/test/cli.zig index 284a184dc6..33dbc2d62b 100644 --- a/test/cli.zig +++ b/test/cli.zig @@ -92,13 +92,13 @@ fn exec(cwd: []const u8, expect_0: bool, argv: []const []const u8) !ChildProcess fn testZigInitLib(zig_exe: []const u8, dir_path: []const u8) !void { _ = try exec(dir_path, true, &[_][]const u8{ zig_exe, "init-lib" }); const test_result = try exec(dir_path, true, &[_][]const u8{ zig_exe, "build", "test" }); - testing.expect(std.mem.endsWith(u8, test_result.stderr, "All 1 tests passed.\n")); + testing.expectStringEndsWith(test_result.stderr, "All 1 tests passed.\n"); } fn testZigInitExe(zig_exe: []const u8, dir_path: []const u8) !void { _ = try exec(dir_path, true, &[_][]const u8{ zig_exe, "init-exe" }); const run_result = try exec(dir_path, true, &[_][]const u8{ zig_exe, "build", "run" }); - testing.expect(std.mem.eql(u8, run_result.stderr, "info: All your codebase are belong to us.\n")); + testing.expectEqualStrings("info: All your codebase are belong to us.\n", run_result.stderr); } fn testGodboltApi(zig_exe: []const u8, dir_path: []const u8) anyerror!void { |
