mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
ab6455f68c
Several deprecated functions were removed: `Dir.exists?`, `File.exists?` & `FileTest.exists?`. Instead of those `FileTest.exist?` must be used (without the `s`). See the release notes for Ruby 3.2.0 as well as the issue for removing the functions: https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/ https://bugs.ruby-lang.org/issues/17391
18 lines
808 B
Ruby
Executable File
18 lines
808 B
Ruby
Executable File
#!/usr/bin/ruby -w
|
|
file = "data/simple/v.mp3"
|
|
|
|
# T_534chapter_generation_when_appending_audio_only
|
|
describe "mkvmerge / generate chapter »when-appending« without video tracks"
|
|
|
|
def hash_results max
|
|
( (1..max).collect { |i| hash_file(sprintf("%s-%02d", tmp, i)) } + [ FileTest.exist?(sprintf("%s-%02d", tmp, max + 1)) ? 'bad' : 'ok' ]).join '+'
|
|
end
|
|
|
|
test_merge "#{file} + #{file} + #{file}", :args => "--generate-chapters when-appending"
|
|
test_merge "#{file} + #{file} + #{file}", :args => "--chapter-language ger --generate-chapters when-appending"
|
|
test "creation and splitting" do
|
|
merge "--chapter-language ger --generate-chapters when-appending --split 30s #{file} + #{file} + #{file}", :output => "#{tmp}-%02d"
|
|
hash_results 7
|
|
end
|
|
test_merge "#{file}", :args => "--generate-chapters when-appending"
|