From dc0952685eac9bb8ade8d4c12ebf802844a4869f Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Sun, 12 Jun 2022 15:57:54 +0200 Subject: Implemented basic cli --- src/pointer.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/pointer.zig') diff --git a/src/pointer.zig b/src/pointer.zig index 485a485..62f8dee 100644 --- a/src/pointer.zig +++ b/src/pointer.zig @@ -332,9 +332,8 @@ test "all" { } test "minimal" { const minimal = std.io.fixedBufferStream("@").reader(); - var f = try field.Field.init(std.testing.allocator); + var f = try field.Field.init_from_reader(std.testing.allocator, minimal); defer f.deinit(); - try f.load(minimal); const argv = [_][]const u8{"minimal"}; var p = try Pointer.init(std.testing.allocator, f, null, argv[0..]); defer p.deinit(); @@ -342,9 +341,8 @@ test "minimal" { } test "almost minimal" { const minimal = std.io.fixedBufferStream(" @").reader(); - var f = try field.Field.init(std.testing.allocator); + var f = try field.Field.init_from_reader(std.testing.allocator, minimal); defer f.deinit(); - try f.load(minimal); const argv = [_][]const u8{"minimal"}; var p = try Pointer.init(std.testing.allocator, f, null, argv[0..]); defer p.deinit(); -- cgit v1.2.3