]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Fix unit test build after d8b654a30ca8
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Aug 2023 12:04:44 +0000 (14:04 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 3 Aug 2023 12:06:22 +0000 (14:06 +0200)
unittest/test_util_DirEntry.cpp

index b5bb5dd94c808e87b4978ab7f00c80cc0b7471eb..a19abf7711b8fc42059c66133f3ec644f951ad96 100644 (file)
@@ -646,14 +646,16 @@ TEST_CASE("Win32 No Sharing")
 // Creating a directory junction for test purposes is tricky on Windows.
 // Instead, test a well-known junction that has existed in all Windows versions
 // since Vista. (Not present on Wine.)
-TEST_CASE("Win32 Directory Junction"
-          * doctest::skip(!win32_is_junction(util::expand_environment_variables(
-            "${ALLUSERSPROFILE}\\Application Data"))))
+TEST_CASE(
+  "Win32 Directory Junction"
+  * doctest::skip(!win32_is_junction(
+    util::expand_environment_variables("${ALLUSERSPROFILE}\\Application Data")
+      .value_or(""))))
 {
   TestContext test_context;
 
-  DirEntry entry(
-    util::expand_environment_variables("${ALLUSERSPROFILE}\\Application Data"));
+  DirEntry entry(*util::expand_environment_variables(
+    "${ALLUSERSPROFILE}\\Application Data"));
   CHECK(entry);
   CHECK(entry.exists());
   CHECK(entry.error_number() == 0);