Sha256: 2bc15815ef91e2816a3922c2e48d001e854412833f8f70b473a93681a96f143b

Contents?: true

Size: 1.3 KB

Versions: 29

Compression:

Stored size: 1.3 KB

Contents

require 'test_helper'

class FCSHTest < Test::Unit::TestCase
  include Sprout::TestHelper

  context "associate FCSH with an MXMLC task" do

    setup do
      @fixture         = File.join fixtures, 'mxmlc'
      @input           = File.join @fixture, 'simple', 'SomeFile.as'
      @broken_input    = File.join @fixture, 'broken', 'SomeFile.as'
      @expected_output = File.join @fixture, 'simple', 'SomeFile.swf'

      # Uncomment following to see output:
      #Sprout.stdout = $stdout
      #Sprout.stderr = $stderr
    end

    teardown do
      remove_file @expected_output
    end
=begin
    should "collect errors as needed" do
      mxmlc = FlashSDK::MXMLC.new
      mxmlc.input = @broken_input

      fcsh = FlashSDK::FCSH.new
      fcsh.execute false
      fcsh.mxmlc mxmlc.to_shell
      fcsh.quit
      fcsh.wait

      expected_error_message = '1 Error: Syntax error: expecting rightbrace before end of program'
      assert_matches /#{expected_error_message}/, Sprout.stdout.read
    end

    should "spin up FCSH" do
      mxmlc = FlashSDK::MXMLC.new
      mxmlc.input = @input

      fcsh = FlashSDK::FCSH.new
      fcsh.execute false
      fcsh.mxmlc mxmlc.to_shell

      FileUtils.touch @input
      fcsh.compile 1
      fcsh.quit
      fcsh.wait

      assert_file @expected_output
    end
=end
  end
end

Version data entries

29 entries across 29 versions & 3 rubygems

Version Path
flashsdk_sqe-0.0.7 test/unit/fcsh_test.rb
flashsdk_sqe-0.0.6 test/unit/fcsh_test.rb
flashsdk_sqe-0.0.4 test/unit/fcsh_test.rb
flashsdk_sqe-0.0.3 test/unit/fcsh_test.rb
flashsdk_sqe-0.0.2 test/unit/fcsh_test.rb
flashsdk_sqe-0.0.1 test/unit/fcsh_test.rb
flashsdk-1.1.36.pre test/unit/fcsh_test.rb
flashsdk-1.0.34.pre test/unit/fcsh_test.rb
flashsdk-1.0.33.pre test/unit/fcsh_test.rb