@@ -62,6 +62,17 @@ namespace
6262 return os << testCase.suffix ;
6363 }
6464
65+ std::string normalizedFilename (const std::filesystem::path& path)
66+ {
67+ #ifdef _WIN32
68+ auto str = path.filename ().string ();
69+ std::transform (str.begin (), str.end (), str.begin (), [](unsigned char c) { return std::tolower (c); });
70+ return str;
71+ #else
72+ return path.filename ().string ();
73+ #endif
74+ }
75+
6576 static const std::initializer_list<BackupRestoreVerboseCase> BACKUP_RESTORE_VERBOSE_CASES {
6677 {" quiet-quiet" , false , false },
6778 {" verbose-quiet" , true , false },
@@ -280,8 +291,7 @@ BOOST_AUTO_TEST_CASE(multiFileDatabaseAndBackupRoundTrip)
280291 " select count(*), min(trim(rdb$file_name)) from rdb$files where rdb$file_sequence = 1" };
281292 BOOST_REQUIRE (queryFiles.execute (transaction));
282293 BOOST_CHECK_EQUAL (queryFiles.getInt64 (0 ).value (), 1 );
283- BOOST_CHECK_EQUAL (std::filesystem::path{queryFiles.getString (1 ).value ()}.filename (),
284- std::filesystem::path{sourceSecondaryPath}.filename ());
294+ BOOST_CHECK_EQUAL (normalizedFilename (queryFiles.getString (1 ).value ()), normalizedFilename (sourceSecondaryPath));
285295 transaction.commit ();
286296 }
287297
@@ -308,8 +318,7 @@ BOOST_AUTO_TEST_CASE(multiFileDatabaseAndBackupRoundTrip)
308318 restored, transaction, " select count(*), min(trim(rdb$file_name)) from rdb$files where rdb$file_sequence = 1" };
309319 BOOST_REQUIRE (queryFiles.execute (transaction));
310320 BOOST_CHECK_EQUAL (queryFiles.getInt64 (0 ).value (), 1 );
311- BOOST_CHECK_EQUAL (std::filesystem::path{queryFiles.getString (1 ).value ()}.filename (),
312- std::filesystem::path{restoredSecondaryPath}.filename ());
321+ BOOST_CHECK_EQUAL (normalizedFilename (queryFiles.getString (1 ).value ()), normalizedFilename (restoredSecondaryPath));
313322 transaction.commit ();
314323
315324 Attachment cleanup{CLIENT , sourceDatabaseUri, attachmentOptions};
0 commit comments