summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-05-11 14:47:52 +0200
committerCarl Hetherington <cth@carlh.net>2023-05-11 14:52:33 +0200
commiteeee8ab7ad46b9eda35f0156540984d3ed340e15 (patch)
tree29e6b2c17e16536d251faf832e20bf202ba91a3e /test
parent919b61fbe43e28ffda689b735721b3042be081ad (diff)
Check that all <Font> tags have a corresponding <LoadFont> in the verifier.
Diffstat (limited to 'test')
-rw-r--r--test/verify_test.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/verify_test.cc b/test/verify_test.cc
index 3ac3c83c..a43e989b 100644
--- a/test/verify_test.cc
+++ b/test/verify_test.cc
@@ -3656,3 +3656,26 @@ BOOST_AUTO_TEST_CASE(verify_too_many_subtitle_namespaces)
{ dcp::VerificationNote::Type::WARNING, dcp::VerificationNote::Code::INCORRECT_SUBTITLE_NAMESPACE_COUNT, std::string{"315de731-1173-484c-9a35-bdacf5a9d99d"} }
});
}
+
+
+BOOST_AUTO_TEST_CASE(verify_missing_load_font)
+{
+ path const dir("build/test/verify_missing_load_font");
+ prepare_directory (dir);
+ copy_file ("test/data/subs1.xml", dir / "subs.xml");
+ {
+ Editor editor(dir / "subs.xml");
+ editor.delete_first_line_containing("LoadFont");
+ }
+ auto asset = make_shared<dcp::InteropSubtitleAsset>(dir / "subs.xml");
+ auto reel_asset = make_shared<dcp::ReelInteropSubtitleAsset>(asset, dcp::Fraction(24, 1), 16 * 24, 0);
+ write_dcp_with_single_asset (dir, reel_asset, dcp::Standard::INTEROP);
+
+ check_verify_result (
+ {dir}, {
+ { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::INVALID_STANDARD },
+ dcp::VerificationNote(dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISSING_LOAD_FONT).set_id("theFontId")
+ });
+
+}
+