X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fhints_test.cc;h=949ba18c0c5abbecba258e68976f03805f1b515a;hb=HEAD;hp=5e59ef9241a7b60763eb5760b557e096d42106fc;hpb=e7245abe84a1a09a5f680e426b5dfac2de2e472a;p=dcpomatic.git diff --git a/test/hints_test.cc b/test/hints_test.cc index 5e59ef924..949ba18c0 100644 --- a/test/hints_test.cc +++ b/test/hints_test.cc @@ -183,20 +183,26 @@ BOOST_AUTO_TEST_CASE (hint_subtitle_mxf_too_big) { string const name = "hint_subtitle_mxf_too_big"; - dcp::File fake_font("build/test/hint_subtitle_mxf_too_big.ttf", "w"); - for (int i = 0; i < 4096; ++i) { - std::vector rubbish(65536); - fake_font.write(rubbish.data(), 1, rubbish.size()); + auto film = new_test_film2 (name); + + for (int i = 0; i < 4; ++i) { + dcp::File fake_font("build/test/hint_subtitle_mxf_too_big.ttf", "w"); + for (int i = 0; i < 512; ++i) { + std::vector rubbish(65536); + fake_font.write(rubbish.data(), 1, rubbish.size()); + } + fake_font.close(); + + auto content = content_factory(String::compose("test/data/%1%2.xml", name, i))[0]; + content->text[0]->set_type(TextType::OPEN_SUBTITLE); + content->text[0]->set_language(dcp::LanguageTag("en-US")); + film->examine_and_add_content(content); + BOOST_REQUIRE (!wait_for_jobs()); + auto const font = content->text[0]->get_font(String::compose("0_font_%1", i)); + BOOST_REQUIRE(font); + font->set_file("build/test/hint_subtitle_mxf_too_big.ttf"); } - fake_font.close(); - auto film = new_test_film2 (name); - auto content = content_factory("test/data/" + name + ".srt")[0]; - content->text.front()->set_type (TextType::OPEN_SUBTITLE); - content->text.front()->set_language (dcp::LanguageTag("en-US")); - film->examine_and_add_content (content); - BOOST_REQUIRE (!wait_for_jobs()); - content->text.front()->get_font("")->set_file("build/test/hint_subtitle_mxf_too_big.ttf"); auto hints = get_hints (film); BOOST_REQUIRE_EQUAL (hints.size(), 1U); @@ -285,7 +291,7 @@ BOOST_AUTO_TEST_CASE (hints_certificate_validity) hints[0], "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period " "that is too long. This will cause problems playing back DCPs on some systems. " - "You are advised to re-create the signing certificate chain by clicking the " + "It is advisable to re-create the signing certificate chain by clicking the " "\"Re-make certificates and key...\" button in the Keys page of Preferences." ); }