diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-05-16 23:14:21 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-05-16 23:19:55 +0200 |
| commit | 7ce07c5fbc70befc83e9a9220ce7204e65ee515e (patch) | |
| tree | 30153bb0593a6cfdc62893e8712b7232da4f3c8a /test | |
| parent | b648505349e6a92835600429249bf220c89a128c (diff) | |
Don't write fonts to closed caption assets, even if we have some (re-fixing #2505).2525-ccap-fonts
Diffstat (limited to 'test')
| -rw-r--r-- | test/closed_caption_test.cc | 19 |
1 files changed, 19 insertions, 0 deletions
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<DCPContent>("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); +} + |
