From 78dcd1b23ed4ca9d4202e1613ce2ec17c7b85e5c Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 28 Dec 2020 21:09:47 -0700 Subject: [PATCH] std.process: update arg iterator tests These tests asserted there were no args passed to the test binary, but now there is an arg intentionally passed to the test binary, so the test case needed to be updated. --- lib/std/process.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/process.zig b/lib/std/process.zig index 275c8bc77b..5eb58671a9 100644 --- a/lib/std/process.zig +++ b/lib/std/process.zig @@ -517,7 +517,8 @@ test "args iterator" { const given_suffix = std.fs.path.basename(prog_name); testing.expect(mem.eql(u8, expected_suffix, given_suffix)); - testing.expectEqual(it.next(ga), null); + testing.expect(it.skip()); // Skip over zig_exe_path, passed to the test runner + testing.expect(it.next(ga) == null); testing.expect(!it.skip()); }