2004-08-19 19:37:07 +00:00
|
|
|
#!/usr/bin/ruby -w
|
|
|
|
|
2021-07-07 14:06:32 +00:00
|
|
|
class T_0014splitting_by_size < Test
|
2004-08-25 17:23:07 +00:00
|
|
|
def description
|
|
|
|
return "mkvmerge / splitting by file size / in(AVI)"
|
2004-08-19 19:37:07 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def run
|
2004-08-30 22:17:55 +00:00
|
|
|
merge(tmp + "-%03d ", "--split-max-files 2 --split 4m data/avi/v.avi")
|
2004-08-19 19:37:07 +00:00
|
|
|
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
|
|
|
|
|