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.84 spec/iface/kern/debug_spec.rb
flok-0.0.83 spec/iface/kern/debug_spec.rb
flok-0.0.82 spec/iface/kern/debug_spec.rb
flok-0.0.81 spec/iface/kern/debug_spec.rb
flok-0.0.80 spec/iface/kern/debug_spec.rb
flok-0.0.79 spec/iface/kern/debug_spec.rb
flok-0.0.78 spec/iface/kern/debug_spec.rb
flok-0.0.77 spec/iface/kern/debug_spec.rb
flok-0.0.76 spec/iface/kern/debug_spec.rb
flok-0.0.75 spec/iface/kern/debug_spec.rb
flok-0.0.74 spec/iface/kern/debug_spec.rb
flok-0.0.73 spec/iface/kern/debug_spec.rb
flok-0.0.72 spec/iface/kern/debug_spec.rb
flok-0.0.71 spec/iface/kern/debug_spec.rb
flok-0.0.70 spec/iface/kern/debug_spec.rb
flok-0.0.69 spec/iface/kern/debug_spec.rb
flok-0.0.68 spec/iface/kern/debug_spec.rb
flok-0.0.67 spec/iface/kern/debug_spec.rb
flok-0.0.66 spec/iface/kern/debug_spec.rb
flok-0.0.65 spec/iface/kern/debug_spec.rb