From 223e1a261396785d05ef49e1a0c641cdeb739c53 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 6 Apr 2005 14:52:15 +0000 Subject: [PATCH] Added a test for the chapter handling during splitting (see commit 2869 and Anthill bug 122). --- tests/results.txt | 1 + tests/test-210splitting_and_chapters.rb | 38 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 tests/test-210splitting_and_chapters.rb diff --git a/tests/results.txt b/tests/results.txt index be6c41732..150835793 100644 --- a/tests/results.txt +++ b/tests/results.txt @@ -56,3 +56,4 @@ T_206X_vobsub:1871f1e7e83dc90ba918a1337bc8eb30-287d40b353664d122f12dfeae3c84888- T_207segmentinfo:6f78ae296efa17b704ceca71de9ff728:passed:20050211-234856 T_208cat_and_splitting:55c3d406e2b4f793f7d0e1f0547d66b3-2d5670d74da87a4ed48e00720fd8c16f:passed:20050306-152640 T_209ac3misdeetected_as_mpeges:173dc3a17a1d74b1a1ee6d6ea65302ba:passed:20050315-092851 +T_210splitting_and_chapters:01e844df443f35ab9221f8db4dd91cc0-6f1872c33fa82197ee29ab1651a43edf-6051575a530c2097cce6668b30e0c17e-d1bd8d5a9333a9b660bc25a4466704d5:passed:20050406-165104 diff --git a/tests/test-210splitting_and_chapters.rb b/tests/test-210splitting_and_chapters.rb new file mode 100644 index 000000000..7da14d7cd --- /dev/null +++ b/tests/test-210splitting_and_chapters.rb @@ -0,0 +1,38 @@ +#!/usr/bin/ruby -w + +class T_210splitting_and_chapters < Test + def description + return "mkvmerge / splitting and chapters / in(AVI)" + end + + def run + merge(tmp + "-%03d ", "--split-max-files 2 --split 4m data/avi/v.avi " + + "--chapters data/text/shortchaps.txt") + if (!FileTest.exist?(tmp + "-001")) + error("First split file does not exist.") + end + if (!FileTest.exist?(tmp + "-002")) + File.unlink(tmp + "-001") + error("Second split file does not exist.") + end + hash = hash_file(tmp + "-001") + "-" + hash_file(tmp + "-002") + File.unlink(tmp + "-001") + File.unlink(tmp + "-002") + + merge(tmp + "-%03d ", "--split-max-files 2 --split 4m data/avi/v.avi " + + "--chapters data/text/shortchaps.txt --link") + if (!FileTest.exist?(tmp + "-001")) + error("First split file does not exist.") + end + if (!FileTest.exist?(tmp + "-002")) + File.unlink(tmp + "-001") + error("Second split file does not exist.") + end + hash += "-" + hash_file(tmp + "-001") + "-" + hash_file(tmp + "-002") + File.unlink(tmp + "-001") + File.unlink(tmp + "-002") + + return hash + end +end +