test/fixtures/sdk/mxmlc in flashsdk-1.0.27.pre vs test/fixtures/sdk/mxmlc in flashsdk-1.0.28.pre
- old
+ new
@@ -10,16 +10,19 @@
# the real MXMLC binary for any test.
class FakeMXMLC
def initialize args
#puts ">> ARGS: #{args.inspect}"
- if(args.size == 2 &&
- args[0] == "-static-link-runtime-shared-libraries" &&
- args[1] == "test/fixtures/mxmlc/simple/SomeFile.as")
+ if(args.size == 3 &&
+ args[0].include?('SomeFile.swf') &&
+ args[1].include?('-static-link-runtime-shared-libraries') &&
+ args[2].include?('SomeFile.as'))
compile_simple_swf args
elsif args == ["-output=test/fixtures/air/simple/bin/SomeProject.swf", "-static-link-runtime-shared-libraries", "test/fixtures/air/simple/SomeProject.as"]
compile_amxmlc_swf args
+ else
+ raise "Unexpected args sent to mxmlc stub #{args.join(', ')}"
end
end
private
@@ -31,10 +34,10 @@
##
# /Users/lbayes/Library/Sprouts/1.0/cache/flex4/4.1.0.16076/bin/mxmlc -static-link-runtime-shared-libraries test/fixtures/mxmlc/simple/SomeFile.as
# Loading configuration file /Users/lbayes/Library/Sprouts/1.0/cache/flex4/4.1.0.16076/frameworks/flex-config.xml
# /Users/lbayes/Projects/Sprouts/flashsdk/test/fixtures/mxmlc/simple/SomeFile.swf (558 bytes)
def compile_simple_swf args
- path = File.expand_path(args[1].gsub(/\.as$/, '.swf'))
+ path = File.expand_path(args[0].gsub(/-output=/, ''))
compile_swf path
end
def compile_swf path
File.open path, 'wb+' do |f|