summaryrefslogtreecommitdiff
path: root/test/srt_subtitle_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-07-09 20:10:09 +0100
committerCarl Hetherington <cth@carlh.net>2018-07-09 20:10:09 +0100
commitfa2c49210c9fcf0f26205927aec0aceb13ca69ce (patch)
tree3f4c060d5876929d58e3b02b5220121e558e16c4 /test/srt_subtitle_test.cc
parent35928d882377e35db4eba43fb0f5882e81fa1a29 (diff)
Don't write multiple <LoadFont> tags to Interop subtitles (#1273).
Diffstat (limited to 'test/srt_subtitle_test.cc')
-rw-r--r--test/srt_subtitle_test.cc22
1 files changed, 3 insertions, 19 deletions
diff --git a/test/srt_subtitle_test.cc b/test/srt_subtitle_test.cc
index a601ea58a..6c2928fa8 100644
--- a/test/srt_subtitle_test.cc
+++ b/test/srt_subtitle_test.cc
@@ -89,25 +89,9 @@ static void
check_subtitle_file (shared_ptr<Film> film, boost::filesystem::path ref)
{
/* Find the subtitle file and check it */
- for (
- boost::filesystem::directory_iterator i = boost::filesystem::directory_iterator (film->directory().get() / film->dcp_name (false));
- i != boost::filesystem::directory_iterator ();
- ++i) {
-
- if (boost::filesystem::is_directory (i->path ())) {
- for (
- boost::filesystem::directory_iterator j = boost::filesystem::directory_iterator (i->path ());
- j != boost::filesystem::directory_iterator ();
- ++j) {
-
- if (boost::algorithm::starts_with (j->path().leaf().string(), "sub_")) {
- list<string> ignore;
- ignore.push_back ("SubtitleID");
- check_xml (*j, ref, ignore);
- }
- }
- }
- }
+ list<string> ignore;
+ ignore.push_back ("SubtitleID");
+ check_xml (subtitle_file(film), ref, ignore);
}
/** Make another DCP with a longer .srt file */