summaryrefslogtreecommitdiff
path: root/test/subtitle_font_id_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-06-27 20:14:31 +0200
committerCarl Hetherington <cth@carlh.net>2024-06-27 20:14:31 +0200
commitd6e8b54b2b60f70f1a8837183bc184809977be67 (patch)
treefe267959d19bca6480e71701fbd642502319352c /test/subtitle_font_id_test.cc
parent7e1e6564c680c426b9ec207c82d5ea2b9f4630ea (diff)
Fix error when importing bad subtitle file (#2838).
The subtitle XML refers to a font with no corresponding <LoadFont>.
Diffstat (limited to 'test/subtitle_font_id_test.cc')
-rw-r--r--test/subtitle_font_id_test.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/subtitle_font_id_test.cc b/test/subtitle_font_id_test.cc
index bc09a9cf1..12d804d20 100644
--- a/test/subtitle_font_id_test.cc
+++ b/test/subtitle_font_id_test.cc
@@ -302,3 +302,17 @@ BOOST_AUTO_TEST_CASE(no_error_with_ccap_that_mentions_no_font)
while (!player.pass()) {}
}
+
+BOOST_AUTO_TEST_CASE(cope_with_unloaded_font_id)
+{
+ /* This file has a <Font> with an ID that corresponds to no <LoadFont> */
+ auto subs = content_factory("test/data/unloaded_font.xml")[0];
+ auto film = new_test_film2("cope_with_unloaded_font_id", { subs });
+ make_and_verify_dcp(
+ film,
+ {
+ dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE,
+ dcp::VerificationNote::Code::MISSING_CPL_METADATA,
+ });
+}
+