Fix refusal to reference overlapping but different text content (#2599).
[dcpomatic.git] / test / subtitle_font_id_change_test.cc
index 878dc650668bd30d152aaea709fcb1b1f873b477..37880382833e8cffbb7aeb6bfdc2cb0ea260b910 100644 (file)
@@ -114,10 +114,12 @@ BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test3)
        BOOST_REQUIRE (!wait_for_jobs());
 
        auto font = content[0]->text.front()->get_font("Arial Black");
+       BOOST_REQUIRE(font);
        BOOST_REQUIRE(font->file());
        BOOST_CHECK_EQUAL(*font->file(), "test/data/Inconsolata-VF.ttf");
 
        font = content[0]->text.front()->get_font("Helvetica Neue");
+       BOOST_REQUIRE(font);
        BOOST_REQUIRE(font->file());
        BOOST_CHECK_EQUAL(*font->file(), "test/data/Inconsolata-VF.ttf");
 
@@ -127,7 +129,9 @@ BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test3)
 
 BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test4)
 {
-       auto film = new_test_film2("subtitle_font_id_change_test4");
+       Cleanup cl;
+
+       auto film = new_test_film2("subtitle_font_id_change_test4", {}, &cl);
        boost::filesystem::remove(film->file("metadata.xml"));
        boost::filesystem::copy_file("test/data/subtitle_font_id_change_test4.xml", film->file("metadata.xml"));
 
@@ -147,5 +151,7 @@ BOOST_AUTO_TEST_CASE(subtitle_font_id_change_test4)
        BOOST_REQUIRE(!wait_for_jobs());
 
        make_and_verify_dcp(film, { dcp::VerificationNote::Code::INVALID_STANDARD });
+
+       cl.run();
 }