Try to fix test.
[dcpomatic.git] / test / srt_subtitle_test.cc
index b6df6e393751f12d695e02cc00ca626162a0fc5d..2b7cb340a3aa9aea600b864c1daa1c689752f18c 100644 (file)
@@ -46,6 +46,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
        film->set_audio_channels (6);
+       film->set_interop (false);
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt"));
        film->examine_and_add_content (content);
        wait_for_jobs ();
@@ -67,6 +68,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test2)
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
        film->set_audio_channels (6);
+       film->set_interop (false);
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt"));
        film->examine_and_add_content (content);
        wait_for_jobs ();
@@ -118,6 +120,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test3)
        film->set_name ("frobozz");
        film->set_interop (true);
        film->set_audio_channels (6);
+       film->set_interop (false);
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, private_data / "Ankoemmling_short.srt"));
        film->examine_and_add_content (content);
        wait_for_jobs ();
@@ -138,6 +141,7 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test4)
        film->set_container (Ratio::from_id ("185"));
        film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR"));
        film->set_name ("frobozz");
+       film->set_interop (false);
        shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/subrip2.srt"));
        content->subtitle->set_use (true);
        content->subtitle->set_burn (false);
@@ -173,6 +177,22 @@ BOOST_AUTO_TEST_CASE (srt_subtitle_test5)
        check_dcp ("test/data/xml_subtitle_test2", film->dir (film->dcp_name ()));
 }
 
+BOOST_AUTO_TEST_CASE (srt_subtitle_test6)
+{
+       shared_ptr<Film> film = new_test_film2 ("srt_subtitle_test6");
+       film->set_interop (true);
+       shared_ptr<TextSubtitleContent> content (new TextSubtitleContent (film, "test/data/frames.srt"));
+       content->subtitle->set_use (true);
+       content->subtitle->set_burn (false);
+       film->examine_and_add_content (content);
+       BOOST_REQUIRE (!wait_for_jobs ());
+       film->make_dcp ();
+       BOOST_REQUIRE (!wait_for_jobs ());
+       film->write_metadata ();
+
+       check_dcp ("test/data/srt_subtitle_test6", film->dir(film->dcp_name()));
+}
+
 #if 0
 /* XXX: this is disabled; there is some difference in font rendering
    between the test machine and others.