fix split_rev

This commit is contained in:
2022-06-28 15:43:48 +03:00
parent 0865965762
commit 3872f2af40
2 changed files with 24 additions and 13 deletions

View File

@@ -151,13 +151,11 @@ test "trivial error: missing passwd file" {
const exit_code = execute(allocator, stdout.writer(), stderr.writer(), args[0..]);
try testing.expectEqual(@as(u8, 1), exit_code);
std.debug.print("stderr: '{s}'\n", .{stderr.items});
if (true) return error.SkipZigTest;
try testing.expect(mem.startsWith(
try testing.expectEqualSlices(
u8,
stderr.items,
"ERROR: FileNotFound: fubar",
));
"ERROR FileNotFound: ./passwd: open \n",
);
}
test "fail" {
@@ -167,7 +165,11 @@ test "fail" {
var stderrw = stderr.writer();
const exit_code = fail(errc.wrapf("got 1", .{}), stderrw, error.NotSure);
try testing.expectEqual(exit_code, 1);
std.debug.print("stderr: '{s}'\n", .{stderr.items});
try testing.expectEqualSlices(
u8,
stderr.items,
"ERROR NotSure: got 1\n",
);
}
test "smoke test" {