diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-04-02 23:43:54 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-04-02 23:43:54 +0000 |
| commit | 698e3ac8863d264237003b49750ae074d612f451 (patch) | |
| tree | a6ef673ad68c1fb43844dd23482c7a97514b3918 /test | |
| parent | d5c8fb9b826aaac2acab58f8a7b2eec4fcce99a6 (diff) | |
Extract subtitle language from text content rather than ISDCFMetadata (part of #1516).
Diffstat (limited to 'test')
| -rw-r--r-- | test/isdcf_name_test.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/isdcf_name_test.cc b/test/isdcf_name_test.cc index c65340e1c..8181ffc43 100644 --- a/test/isdcf_name_test.cc +++ b/test/isdcf_name_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -32,6 +32,8 @@ #include "lib/audio_mapping.h" #include "lib/ffmpeg_content.h" #include "lib/audio_content.h" +#include "lib/content_factory.h" +#include "lib/text_content.h" #include "test.h" #include <iostream> @@ -51,7 +53,6 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) ISDCFMetadata m; m.content_version = 1; m.audio_language = "EN"; - m.subtitle_language = "XX"; m.territory = "UK"; m.rating = "PG"; m.studio = "ST"; @@ -68,9 +69,14 @@ BOOST_AUTO_TEST_CASE (isdcf_name_test) film->_isdcf_date = boost::gregorian::date (2014, boost::gregorian::Jul, 4); film->set_audio_channels (1); film->set_resolution (RESOLUTION_4K); + shared_ptr<Content> text = content_factory("test/data/subrip.srt").front(); + BOOST_REQUIRE_EQUAL (text->text.size(), 1); + text->text.front()->set_language ("fr"); + text->text.front()->set_burn (true); + film->examine_and_add_content (text); + BOOST_REQUIRE (!wait_for_jobs()); m.content_version = 2; m.audio_language = "DE"; - m.subtitle_language = "FR"; m.territory = "US"; m.rating = "R"; m.studio = "DI"; |
