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.41 spec/iface/kern/debug_spec.rb
flok-0.0.40 spec/iface/kern/debug_spec.rb
flok-0.0.39 spec/iface/kern/debug_spec.rb
flok-0.0.38 spec/iface/kern/debug_spec.rb
flok-0.0.36 spec/iface/kern/debug_spec.rb
flok-0.0.35 spec/iface/kern/debug_spec.rb
flok-0.0.34 spec/iface/kern/debug_spec.rb
flok-0.0.33 spec/iface/kern/debug_spec.rb
flok-0.0.32 spec/iface/kern/debug_spec.rb
flok-0.0.31 spec/iface/kern/debug_spec.rb
flok-0.0.30 spec/iface/kern/debug_spec.rb
flok-0.0.29 spec/iface/kern/debug_spec.rb
flok-0.0.28 spec/iface/kern/debug_spec.rb
flok-0.0.27 spec/iface/kern/debug_spec.rb
flok-0.0.26 spec/iface/kern/debug_spec.rb
flok-0.0.25 spec/iface/kern/debug_spec.rb
flok-0.0.24 spec/iface/kern/debug_spec.rb
flok-0.0.23 spec/iface/kern/debug_spec.rb
flok-0.0.21 spec/iface/kern/debug_spec.rb
flok-0.0.20 spec/iface/kern/debug_spec.rb