Sha256: c2788e8de4366f191c27e3100ddc9e92e596b5e0328993f3974276b87a6995f2

Contents?: true

Size: 892 Bytes

Versions: 12

Compression:

Stored size: 892 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'

class TestFlvEdit < Test::Unit::TestCase
  context "Command line results" do
    Dir.glob(File.dirname(__FILE__)+"/text_flv_edit_results/*.txt").each do |fn|
      sep, args, sep, *expect = File.readlines(fn).map!(&:chomp)
      args = args.split(' ')
      args.unshift SHORT_FLV unless args.first.start_with?(".")
      
      context "for 'flvedit #{args.join(' ')}'" do
        setup do
          Time.stubs(:now).returns(Time.utc(2008,"dec",20))
          @result = ""
          runner = FLV::Edit::Runner.new(args)
          runner.options[:trace] = true
          runner.options[:out] = StringIO.new(@result)
          runner.run
        end
        should "match #{fn}" do
          @result = @result.split("\n")
          same = @result & expect
          assert_equal expect-same, @result-same
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
marcandre-flvedit-0.6.3 test/test_flv_edit_results.rb
marcandre-flvedit-0.6.4 test/test_flv_edit_results.rb
marcandre-flvedit-0.7.0 test/test_flv_edit_results.rb
marcandre-flvedit-0.7.1 test/test_flv_edit_results.rb
marcandre-flvedit-0.7.2 test/test_flv_edit_results.rb
marcandre-flvedit-0.7.3 test/test_flv_edit_results.rb
flvedit-0.7.4 test/test_flv_edit_results.rb
flvedit-0.7.2 test/test_flv_edit_results.rb
flvedit-0.7.1 test/test_flv_edit_results.rb
flvedit-0.6.4 test/test_flv_edit_results.rb
flvedit-0.7.0 test/test_flv_edit_results.rb
flvedit-0.6.3 test/test_flv_edit_results.rb