Sha256: d8dd5676b85cb2210077f26109496c54b3056abfe6dec15f8dbd8b209b4b45fc

Contents?: true

Size: 1.17 KB

Versions: 85

Compression:

Stored size: 1.17 KB

Contents

Dir.chdir File.join File.dirname(__FILE__), '../../../'
require './spec/env/iface.rb'
require './spec/lib/helpers.rb'
require './spec/lib/io_extensions.rb'
require './spec/lib/rspec_extensions.rb'

RSpec.describe "iface:kern:debug" do
  module_dep "event"
  include_context "iface:kern"

  #A callback was registered in the kernel for testing purposes
  it "Can call if_debug_eval" do
    #Wait for response
    @pipe.puts [0, "ping"].to_json; @pipe.readline_timeout

    #Send the event, we should get something back
    @pipe.puts [1, "int_debug_eval", "var x = 4; x"].to_json

    res = [
      [0, 3, "if_event", -333, "eval_res", {"res" => 4}]
    ]

    expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
  end

  #Cann call the debug_eval_spec
  it "Can call the debug_eval_spec function" do
    #Wait for response
    @pipe.puts [0, "ping"].to_json; @pipe.readline_timeout

    #Send the event, we should get something back
    @pipe.puts [1, "int_debug_eval", "debug_eval_spec()"].to_json

    res = [
      [0, 3, "if_event", -333, "eval_res", {"res" => "hello"}]
    ]

    expect(@pipe).to readline_and_equal_json_x_within_y_seconds(res, 5.seconds)
  end
end

Version data entries

85 entries across 85 versions & 1 rubygems

Version Path
flok-0.0.105 spec/iface/kern/debug_spec.rb
flok-0.0.103 spec/iface/kern/debug_spec.rb
flok-0.0.102 spec/iface/kern/debug_spec.rb
flok-0.0.101 spec/iface/kern/debug_spec.rb
flok-0.0.100 spec/iface/kern/debug_spec.rb
flok-0.0.99 spec/iface/kern/debug_spec.rb
flok-0.0.98 spec/iface/kern/debug_spec.rb
flok-0.0.97 spec/iface/kern/debug_spec.rb
flok-0.0.96 spec/iface/kern/debug_spec.rb
flok-0.0.95 spec/iface/kern/debug_spec.rb
flok-0.0.94 spec/iface/kern/debug_spec.rb
flok-0.0.93 spec/iface/kern/debug_spec.rb
flok-0.0.92 spec/iface/kern/debug_spec.rb
flok-0.0.91 spec/iface/kern/debug_spec.rb
flok-0.0.90 spec/iface/kern/debug_spec.rb
flok-0.0.89 spec/iface/kern/debug_spec.rb
flok-0.0.88 spec/iface/kern/debug_spec.rb
flok-0.0.87 spec/iface/kern/debug_spec.rb
flok-0.0.86 spec/iface/kern/debug_spec.rb
flok-0.0.85 spec/iface/kern/debug_spec.rb