X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fisdcf_name_test.cc;h=56686d2ac8a4c1c0e69e996dcce975b9a18f3a8c;hb=8b38ce5ff42a35c2dfc1f160369c098a496c0e1a;hp=b1561289581e9f35a216a4e148f05c99d6b85e3d;hpb=d5e6fa029f1fb7b7dccd32dd2906a0858a876cae;p=dcpomatic.git diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index b15612895..56686d2ac 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -233,9 +233,33 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) 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 */ + /* Check that nothing is added for non-existent 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-IAB_2K_20230118_SMPTE_OV"); +} + + +BOOST_AUTO_TEST_CASE(isdcf_name_with_ccap) +{ + auto content = content_factory("test/data/short.srt")[0]; + auto film = new_test_film2("isdcf_name_with_ccap", { content }); + content->text[0]->set_use(true); + content->text[0]->set_type(TextType::CLOSED_CAPTION); + content->text[0]->set_dcp_track(DCPTextTrack("Foo", dcp::LanguageTag("de-DE"))); + 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-DE-CCAP_MOS_2K_20230118_SMPTE_OV"); }