From 69bbdeefd2ddc42952bc89b3b39244ce0d758b42 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 29 Oct 2021 18:11:41 +0200 Subject: filesystem: Improved test for GetRunningExecutablePath (still not ideal) --- zencore/filesystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/filesystem.cpp') diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp index b8e8eff55..a642e2cf6 100644 --- a/zencore/filesystem.cpp +++ b/zencore/filesystem.cpp @@ -840,7 +840,7 @@ TEST_CASE("filesystem") // GetExePath -- this is not a great test as it's so dependent on where the this code gets linked in path BinPath = GetRunningExecutablePath(); - const bool ExpectedExe = BinPath.stem() == "zencore-test" || BinPath.stem() == "zenserver-test" || BinPath.stem() == "zenstore-test"; + const bool ExpectedExe = ToUtf8(BinPath.stem().native()).ends_with("-test"sv) || BinPath.stem() == "zenserver"; CHECK(ExpectedExe); CHECK(is_regular_file(BinPath)); -- cgit v1.2.3