mkvtoolnix/tests/test-0287mkvextract_exit_codes.rb

26 lines
760 B
Ruby
Raw Normal View History

2010-12-22 11:07:10 +00:00
#!/usr/bin/ruby -w
2021-07-07 14:06:32 +00:00
class T_0287mkvextract_exit_codes < Test
2010-12-22 11:07:10 +00:00
def description
"mkvextract / exit codes in various situations"
end
def run
result = []
[ "", # Show help if no mode given
"gnufudel", # Unknown mode
"tracks data/mkv/complex.mkv", # No track ID given
"tracks data/mkv/complex.mkv 12345:doesnotexist", # Non-existing track ID
"attachments data/mkv/complex.mkv", # No attachment ID given
"attachments data/mkv/complex.mkv 12345:doesnotexist", # Non-existing attachment ID
].each do |args|
sys "../src/mkvextract #{args}", 2
result << ($? >> 8)
end
result.collect(&:to_s).join('-')
end
end