From 0b55e2c332cfb700d91c55f8e679c9d98769546f Mon Sep 17 00:00:00 2001 From: Gabi Melman Date: Sun, 22 Dec 2019 00:17:32 +0200 Subject: [PATCH] Update test_loaders.cpp --- tests/test_loaders.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_loaders.cpp b/tests/test_loaders.cpp index e3b0203f..42cc1ec2 100644 --- a/tests/test_loaders.cpp +++ b/tests/test_loaders.cpp @@ -11,7 +11,11 @@ TEST_CASE("env", "[loaders]") { spdlog::drop("l1"); auto l1 = spdlog::create("l1"); +#ifdef _MSVC + _putenv_s("SPDLOG_LEVEL", "l1=warn"); +#else setenv("SPDLOG_LEVEL", "l1=warn", 1); +#endif load_env(); REQUIRE(l1->level() == spdlog::level::warn); REQUIRE(spdlog::default_logger()->level() == spdlog::level::info);