X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fclosed_caption_test.cc;h=71673b4e286abc6e46c992d732e7b2a14d6b2362;hb=7ce07c5fbc70befc83e9a9220ce7204e65ee515e;hp=80effc9a0c0c99e0652eca18c2fea378aa246ba0;hpb=b648505349e6a92835600429249bf220c89a128c;p=dcpomatic.git diff --git a/test/closed_caption_test.cc b/test/closed_caption_test.cc index 80effc9a0..71673b4e2 100644 --- a/test/closed_caption_test.cc +++ b/test/closed_caption_test.cc @@ -19,6 +19,7 @@ */ +#include "lib/dcp_content.h" #include "lib/film.h" #include "lib/string_text_file_content.h" #include "lib/text_content.h" @@ -116,3 +117,21 @@ BOOST_AUTO_TEST_CASE (closed_caption_test2) cl.run (); } + + + +BOOST_AUTO_TEST_CASE(fonts_in_inputs_removed_for_ccaps) +{ + auto dcp_with_ccaps = make_shared("test/data/xml_subtitle_test2"); + auto film = new_test_film2("fonts_in_inputs_removed_for_ccaps", { dcp_with_ccaps }); + for (auto i: dcp_with_ccaps->text) { + i->set_use(true); + i->set_type(TextType::CLOSED_CAPTION); + } + film->set_interop(true); + make_and_verify_dcp(film, { dcp::VerificationNote::Code::INVALID_STANDARD, dcp::VerificationNote::Code::INVALID_SUBTITLE_SPACING }); + + auto sub = dcp::file_to_string(find_file(film->dir(film->dcp_name()), "sub_")); + BOOST_CHECK(sub.find("Font") == std::string::npos); +} +