diff options
Diffstat (limited to 'tests/distros/tdistros_detect.nim')
-rw-r--r-- | tests/distros/tdistros_detect.nim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/distros/tdistros_detect.nim b/tests/distros/tdistros_detect.nim new file mode 100644 index 000000000..793a9edd3 --- /dev/null +++ b/tests/distros/tdistros_detect.nim @@ -0,0 +1,21 @@ +import distros + +discard """ + exitcode: 0 + output: "" +""" + +when defined(windows): + doAssert detectOs(Windows) == true + doAssert detectOs(Ubuntu) == false + doAssert detectOs(MacOSX) == false + +when defined(linux): + doAssert detectOs(Ubuntu) == true + doAssert detectOs(Windows) == false + doAssert detectOs(MacOSX) == false + +when defined(macosx): + doAssert detectOs(MacOSX) == true + doAssert detectOs(Windows) == false + doAssert detectOs(Ubuntu) == false \ No newline at end of file |