test: make util test compile also on Windows

This commit is contained in:
Michele Caini 2020-07-31 12:27:43 +02:00
parent 934851e3f5
commit a77051e73a

View File

@ -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);