From 94fe4f4b6373ca40a4ca5be06a1c8caea5ed76f2 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 21 Feb 2016 19:19:34 +0000 Subject: Don't write duplicate nodes into subtitle files. --- test/data | 2 +- test/xml_subtitle_test.cc | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/data b/test/data index b4b0f4e1e..be07663c9 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit b4b0f4e1ef3e0afac12d82d2c6c04ce39ea2f6ff +Subproject commit be07663c918efc93e32b6344d533974a16a9b9f4 diff --git a/test/xml_subtitle_test.cc b/test/xml_subtitle_test.cc index 554591b92..4e0dcf8ae 100644 --- a/test/xml_subtitle_test.cc +++ b/test/xml_subtitle_test.cc @@ -50,3 +50,24 @@ BOOST_AUTO_TEST_CASE (xml_subtitle_test) /* Should be blank video with MXF subtitles */ check_dcp ("test/data/xml_subtitle_test", film->dir (film->dcp_name ())); } + +/** Check the subtitle XML when there are two subtitle files in the project */ +BOOST_AUTO_TEST_CASE (xml_subtitle_test2) +{ + shared_ptr film = new_test_film ("xml_subtitle_test2"); + film->set_container (Ratio::from_id ("185")); + film->set_dcp_content_type (DCPContentType::from_isdcf_name ("TLR")); + film->set_name ("frobozz"); + film->set_interop (true); + shared_ptr content (new TextSubtitleContent (film, "test/data/subrip2.srt")); + content->set_use_subtitles (true); + content->set_burn_subtitles (false); + film->examine_and_add_content (content); + film->examine_and_add_content (content); + wait_for_jobs (); + film->make_dcp (); + wait_for_jobs (); + film->write_metadata (); + + check_dcp ("test/data/xml_subtitle_test2", film->dir (film->dcp_name ())); +} -- cgit v1.2.3