summary refs log tree commit diff stats
path: root/tests/stdlib/tos.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/stdlib/tos.nim')
-rw-r--r--tests/stdlib/tos.nim7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/stdlib/tos.nim b/tests/stdlib/tos.nim
index db64f6254..6651a25db 100644
--- a/tests/stdlib/tos.nim
+++ b/tests/stdlib/tos.nim
@@ -655,3 +655,10 @@ block: # normalizeExe
     doAssert "foo/../bar".dup(normalizeExe) == "foo/../bar"
   when defined(windows):
     doAssert "foo".dup(normalizeExe) == "foo"
+
+block: # isAdmin
+  let isAzure = existsEnv("TF_BUILD") # xxx factor with testament.specs.isAzure
+  # In Azure on Windows tests run as an admin user
+  if isAzure and defined(windows): doAssert isAdmin()
+  # In Azure on POSIX tests run as a normal user
+  if isAzure and defined(posix): doAssert not isAdmin()