mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 18:41:35 +08:00
Update test_loaders.cpp
This commit is contained in:
parent
b105046202
commit
0b55e2c332
@ -11,7 +11,11 @@ TEST_CASE("env", "[loaders]")
|
|||||||
{
|
{
|
||||||
spdlog::drop("l1");
|
spdlog::drop("l1");
|
||||||
auto l1 = spdlog::create<spdlog::sinks::test_sink_st>("l1");
|
auto l1 = spdlog::create<spdlog::sinks::test_sink_st>("l1");
|
||||||
|
#ifdef _MSVC
|
||||||
|
_putenv_s("SPDLOG_LEVEL", "l1=warn");
|
||||||
|
#else
|
||||||
setenv("SPDLOG_LEVEL", "l1=warn", 1);
|
setenv("SPDLOG_LEVEL", "l1=warn", 1);
|
||||||
|
#endif
|
||||||
load_env();
|
load_env();
|
||||||
REQUIRE(l1->level() == spdlog::level::warn);
|
REQUIRE(l1->level() == spdlog::level::warn);
|
||||||
REQUIRE(spdlog::default_logger()->level() == spdlog::level::info);
|
REQUIRE(spdlog::default_logger()->level() == spdlog::level::info);
|
||||||
|
Loading…
Reference in New Issue
Block a user