From 2fecea3b47ab64a8b8580b9d186d05c18ae0e29c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 15 Jan 2021 22:56:38 +0100 Subject: Bv2.1 8.4 We must have es --- test/verify_test.cc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'test/verify_test.cc') diff --git a/test/verify_test.cc b/test/verify_test.cc index 31647933..0b7faad5 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -1902,3 +1902,28 @@ BOOST_AUTO_TEST_CASE (verify_text_entry_point) } ); } + + +BOOST_AUTO_TEST_CASE (verify_assets_must_have_hashes) +{ + RNGFixer fix; + + boost::filesystem::path const dir("build/test/verify_assets_must_have_hashes"); + auto dcp = make_simple (dir); + dcp->write_xml (dcp::SMPTE); + BOOST_REQUIRE_EQUAL (dcp->cpls().size(), 1U); + + { + BOOST_REQUIRE (dcp->cpls()[0]->file()); + Editor e(dcp->cpls()[0]->file().get()); + e.replace("cb1OLhgHG9svy7G8hoTSPpltzhw=", ""); + } + + check_verify_result ( + {dir}, + { + { dcp::VerificationNote::VERIFY_ERROR, dcp::VerificationNote::CPL_HASH_INCORRECT }, + { dcp::VerificationNote::VERIFY_BV21_ERROR, dcp::VerificationNote::MISSING_HASH } + }); +} + -- cgit v1.2.3