Skip to content

Commit

Permalink
Non-existent user tests only make sense on unix systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
rofinn committed Nov 24, 2021
1 parent a1ff82a commit ebea92e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/system.jl
Original file line number Diff line number Diff line change
Expand Up @@ -294,15 +294,17 @@ ps = PathSet(; symlink=true)
@test u_int.uid isa Unsigned
@test g_int.gid isa Unsigned

# Non-existent user or group
u_int = FilePathsBase.User(UInt(9999))
g_int = FilePathsBase.Group(UInt(9999))
@test u_int isa FilePathsBase.User
@test g_int isa FilePathsBase.Group
@test u_int.uid == UInt(9999)
@test g_int.gid == UInt(9999)
@test u_int.name == "NA"
@test g_int.name == "NA"
# Non-existent user or group on unix
if Sys.isunix()
u_int = FilePathsBase.User(UInt(9999))
g_int = FilePathsBase.Group(UInt(9999))
@test u_int isa FilePathsBase.User
@test g_int isa FilePathsBase.Group
@test u_int.uid == UInt(9999)
@test g_int.gid == UInt(9999)
@test u_int.name == "NA"
@test g_int.name == "NA"
end
end
end

Expand Down

0 comments on commit ebea92e

Please sign in to comment.