Sha256: 51f394213228072ac6937671634b3bac2dd793499aff2ebfc26a9479d4b15d0d
Contents?: true
Size: 1.38 KB
Versions: 1
Compression:
Stored size: 1.38 KB
Contents
#!/usr/bin/env ruby ## # This is a Fake executable that will behave # exactly like a real FDB executable for a # specific, expected set of steps. class FakeFDB def initialize str = "Adobe fdb (Flash Player Debugger) [build 16076]\n" str << "Copyright (c) 2004-2007 Adobe, Inc. All rights reserved.\n" str << "(fdb) " printf str gather_input end def gather_input $stdout.flush command = $stdin.gets.chomp! if command == "run" handle_run elsif command == "continue" handle_continue elsif command == "kill" handle_kill elsif command == "quit" handle_quit else puts "" raise "Don't know how to respond to #{command}" end gather_input end def handle_run str = "Waiting for Player to connect\n" str << "Player connected; session starting.\n" str << "Set breakpoints and then type 'continue' to resume the session.\n" str = "[SWF] Users:lbayes:Projects:AsUnit-P2:asunit-4.0:bin:AsUnitRunner.swf - 226,833 bytes after decompression\n" str << "(fdb) " printf str end def handle_continue str = "Breakpoint 1, AsUnitRunner() at AsUnitRunner.as:12\n" str << "12 core = new TextCore();\n" str << "(fdb) " printf str end def handle_kill printf "Kill the program being debugged? (y or n) " end def handle_quit exit end end fdb = FakeFDB.new
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flashsdk-1.0.14.pre | test/fixtures/sdk/fdb |