X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=test%2Fisdcf_name_test.cc;h=2b9092c8329cbaa2d87e14ea3d5b69006b4df91b;hp=4d17f704c4507bbe0cfeddeade2b339f4151aee4;hb=cc279961a2a9ffea67ed21378fef44c2e1bcb202;hpb=b1e22dff981fb86ae04b12bb5a064e61030793a8 diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index 4d17f704c..2b9092c83 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -96,9 +96,9 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) film->set_interop (false); BOOST_CHECK_EQUAL (film->isdcf_name(false), "MyNiceFilmWith_TLR-2_S_DE-fr_US-R_MOS_4K_DI_20140704_PPF_SMPTE_OV"); - /* Test to see that RU ratings like 6+ survive */ + /* Test to see that RU ratings like 6+ are stripped of their + */ film->set_ratings({dcp::Rating("RARS", "6+")}); - BOOST_CHECK_EQUAL (film->dcp_name(false), "MyNiceFilmWith_TLR-2_S_DE-fr_US-6+_MOS_4K_DI_20140704_PPF_SMPTE_OV"); + BOOST_CHECK_EQUAL (film->dcp_name(false), "MyNiceFilmWith_TLR-2_S_DE-fr_US-6_MOS_4K_DI_20140704_PPF_SMPTE_OV"); film->set_ratings({dcp::Rating("MPA", "R")}); /* Test interior aspect ratio: shouldn't be shown with trailers */ @@ -232,5 +232,20 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) /* Check that the proper codes are used, not just part of the language code; in this case, QBP instead of PT (#2235) */ film->set_audio_language(dcp::LanguageTag("pt-BR")); BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_QBP-fr_US-R_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV"); + + /* Check that nothing is added for non-existant ratings */ + film->set_ratings({}); + BOOST_CHECK_EQUAL (film->isdcf_name(false), "LikeShouting_XSN-2_F-133_QBP-fr_US_71-HI-VI_4K_DI_20140704_PPF_SMPTE_OV"); +} + + +BOOST_AUTO_TEST_CASE(isdcf_name_with_atmos) +{ + auto content = content_factory(TestPaths::private_data() / "atmos_asset.mxf"); + auto film = new_test_film2("isdcf_name_with_atmos", content); + film->_isdcf_date = boost::gregorian::date(2023, boost::gregorian::Jan, 18); + film->set_name("Hello"); + + BOOST_CHECK_EQUAL(film->isdcf_name(false), "Hello_TST-1_F_XX-XX_MOS-ATMOS_2K_20230118_SMPTE_OV"); }