From a77051e73a30ad598148c048c7db4801870e97f5 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 31 Jul 2020 12:27:43 +0200 Subject: [PATCH] test: make util test compile also on Windows --- test/uvw/util.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/uvw/util.cpp b/test/uvw/util.cpp index 077075da..82bb63f5 100644 --- a/test/uvw/util.cpp +++ b/test/uvw/util.cpp @@ -93,7 +93,11 @@ TEST(Util, Utilities) { ASSERT_FALSE(passwd.homedir().empty()); ASSERT_NO_THROW(passwd.uid()); ASSERT_NO_THROW(passwd.gid()); + +#ifndef _MSC_VER + // libuv returns a null string for the shell on Windows ASSERT_FALSE(passwd.shell().empty()); +#endif ASSERT_EQ(uvw::Utilities::guessHandle(uvw::FileHandle{-1}), uvw::HandleType::UNKNOWN); ASSERT_NE(uvw::Utilities::guessHandle(uvw::StdIN), uvw::HandleType::UNKNOWN);