complete the test for getgrnam

This commit is contained in:
Motiejus Jakštys 2022-04-18 06:57:34 +03:00 committed by Motiejus Jakštys
parent c1e20db0bd
commit 130aea7cf5

View File

@ -632,6 +632,12 @@ test "high-level API" {
try testing.expect(all != null); try testing.expect(all != null);
try testing.expectEqual(all.?.gid, 9999); try testing.expectEqual(all.?.gid, 9999);
try testing.expectEqualStrings(all.?.name, "all"); try testing.expectEqualStrings(all.?.name, "all");
const members = mem.sliceTo(all.?.members, null);
try testing.expectEqual(members.len, 4);
try testing.expectEqualStrings(mem.sliceTo(members[0].?, 0), "Name" ** 8);
try testing.expectEqualStrings(mem.sliceTo(members[1].?, 0), "root");
try testing.expectEqualStrings(mem.sliceTo(members[2].?, 0), "svc-bar");
try testing.expectEqualStrings(mem.sliceTo(members[3].?, 0), "vidmantas");
} }
test "additionalGids" { test "additionalGids" {