Sha256: eddd7b784d1859b2f5330fb293730577ff4184db7b3a753ed5fb8e06aa79a998

Contents?: true

Size: 1.08 KB

Versions: 7

Compression:

Stored size: 1.08 KB

Contents

require 'test_helper'

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

  context "a new fcsh server" do

    setup do
      # Uncomment to see output:
      #Sprout.stdout = $stdout
      #Sprout.stderr = $stderr

      @input = File.join(fixtures, 'mxmlc', 'simple', 'SomeFile.as')
      @test_port = 12543
    end

    should "be instantiable" do
      service_ready = false
      # Create the remote side of the connection:
      t = Thread.new do
        Thread.current.abort_on_exception = true
        server = FlashSDK::FCSHSocket.new
        server.port = @test_port
        service_ready = true
        server.listen
      end

      # Wait for the remote connection to exist
      while !service_ready
        sleep 0.1
      end

      sleep 2.0

      mxmlc = FlashSDK::MXMLC.new
      mxmlc.input = @input

      client = FlashSDK::FCSHSocket.new
      client.port = @test_port
      client.execute "mxmlc #{mxmlc.to_shell}"
      FileUtils.touch @input
      client.execute "mxmlc #{mxmlc.to_shell}"
      client.execute "quit"

      t.join
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
flashsdk-1.0.27.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.26.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.25.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.23.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.22.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.21.pre test/unit/fcsh_socket_test.rb
flashsdk-1.0.20.pre test/unit/fcsh_socket_test.rb