Skip to content

Commit ebea92e

Browse files
committed
Non-existent user tests only make sense on unix systems.
1 parent a1ff82a commit ebea92e

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

test/system.jl

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,15 +294,17 @@ ps = PathSet(; symlink=true)
294294
@test u_int.uid isa Unsigned
295295
@test g_int.gid isa Unsigned
296296

297-
# Non-existent user or group
298-
u_int = FilePathsBase.User(UInt(9999))
299-
g_int = FilePathsBase.Group(UInt(9999))
300-
@test u_int isa FilePathsBase.User
301-
@test g_int isa FilePathsBase.Group
302-
@test u_int.uid == UInt(9999)
303-
@test g_int.gid == UInt(9999)
304-
@test u_int.name == "NA"
305-
@test g_int.name == "NA"
297+
# Non-existent user or group on unix
298+
if Sys.isunix()
299+
u_int = FilePathsBase.User(UInt(9999))
300+
g_int = FilePathsBase.Group(UInt(9999))
301+
@test u_int isa FilePathsBase.User
302+
@test g_int isa FilePathsBase.Group
303+
@test u_int.uid == UInt(9999)
304+
@test g_int.gid == UInt(9999)
305+
@test u_int.name == "NA"
306+
@test g_int.name == "NA"
307+
end
306308
end
307309
end
308310

0 commit comments

Comments
 (0)