diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-07-09 22:53:27 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-07-10 20:50:32 +0200 |
| commit | 62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch) | |
| tree | 2a0440ed2bdb58c608582b75da6c877527dd6bda /test/kdm_naming_test.cc | |
| parent | 2c499921a9f8615c8368d8161cb43c9a93c67311 (diff) | |
Replace String::compose with fmt.
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc
sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
Diffstat (limited to 'test/kdm_naming_test.cc')
| -rw-r--r-- | test/kdm_naming_test.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/test/kdm_naming_test.cc b/test/kdm_naming_test.cc index 4735ef75e..e8bafb6a2 100644 --- a/test/kdm_naming_test.cc +++ b/test/kdm_naming_test.cc @@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test) boost::algorithm::replace_all (until_time, ":", "-"); auto const dcp_date = boost::gregorian::to_iso_string(film->isdcf_date()); - auto const ref = String::compose("KDM_Cinema_A_-_Screen_1_-_MyGreatFilm_TST-1_F_XX-XX_MOS_2K_%1_SMPTE_OV_-_%2_%3_-_%4_%5.xml", dcp_date, from.date(), from_time, until.date(), until_time); + auto const ref = fmt::format("KDM_Cinema_A_-_Screen_1_-_MyGreatFilm_TST-1_F_XX-XX_MOS_2K_{}_SMPTE_OV_-_{}_{}_-_{}_{}.xml", dcp_date, from.date(), from_time, until.date(), until_time); BOOST_CHECK_MESSAGE (boost::filesystem::exists("build/test/single_kdm_naming_test/" + ref), "File " << ref << " not found"); } @@ -224,41 +224,41 @@ BOOST_AUTO_TEST_CASE(directory_kdm_naming_test) boost::algorithm::replace_all (until_time, ":", "-"); auto const dcp_date = boost::gregorian::to_iso_string(film->isdcf_date()); - auto const dcp_name = String::compose("MyGreatFilm_TST-1_F_XX-XX_MOS_2K_%1_SMPTE_OV", dcp_date); - auto const common = String::compose("%1_-_%2_%3_-_%4_%5", dcp_name, from.date(), from_time, until.date(), until_time); + auto const dcp_name = fmt::format("MyGreatFilm_TST-1_F_XX-XX_MOS_2K_{}_SMPTE_OV", dcp_date); + auto const common = fmt::format("{}_-_{}_{}_-_{}_{}", dcp_name, from.date(), from_time, until.date(), until_time); path const base = "build/test/directory_kdm_naming_test"; - path dir_a = String::compose("Cinema_A_-_%s_-_%1", common); + path dir_a = fmt::format("Cinema_A_-_%s_-_{}", common); BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a), "Directory " << dir_a << " not found"); - path dir_b = String::compose("Cinema_B_-_%s_-_%1", common); + path dir_b = fmt::format("Cinema_B_-_%s_-_{}", common); BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b), "Directory " << dir_b << " not found"); #ifdef DCPOMATIC_WINDOWS - path ref = String::compose("KDM_%1.xml", dcp_name); + path ref = fmt::format("KDM_{}.xml", dcp_name); #else - path ref = String::compose("KDM_Cinema_A_-_Screen_2_-_%1_-_%2.xml", common, cpl_id); + path ref = fmt::format("KDM_Cinema_A_-_Screen_2_-_{}_-_{}.xml", common, cpl_id); #endif BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a / ref), "File " << ref << " not found"); #ifdef DCPOMATIC_WINDOWS - ref = String::compose("KDM_%1.xml", dcp_name); + ref = fmt::format("KDM_{}.xml", dcp_name); #else - ref = String::compose("KDM_Cinema_B_-_Screen_X_-_%1_-_%2.xml", common, cpl_id); + ref = fmt::format("KDM_Cinema_B_-_Screen_X_-_{}_-_{}.xml", common, cpl_id); #endif BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b / ref), "File " << ref << " not found"); #ifdef DCPOMATIC_WINDOWS - ref = String::compose("KDM_%1.xml", dcp_name); + ref = fmt::format("KDM_{}.xml", dcp_name); #else - ref = String::compose("KDM_Cinema_A_-_Screen_1_-_%1_-_%2.xml", common, cpl_id); + ref = fmt::format("KDM_Cinema_A_-_Screen_1_-_{}_-_{}.xml", common, cpl_id); #endif BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a / ref), "File " << ref << " not found"); #ifdef DCPOMATIC_WINDOWS - ref = String::compose("KDM_%1.xml", dcp_name); + ref = fmt::format("KDM_{}.xml", dcp_name); #else - ref = String::compose("KDM_Cinema_B_-_Screen_Z_-_%1_-_%2.xml", common, cpl_id); + ref = fmt::format("KDM_Cinema_B_-_Screen_Z_-_{}_-_{}.xml", common, cpl_id); #endif BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b / ref), "File " << ref << " not found"); } |
