* Loop our runner until it is "stopped"; * Use the event dispatcher to stop the runner on `mod1+q' key press; * Tell the manager to grab the `q' key.
31 lines
555 B
Ruby
31 lines
555 B
Ruby
def uhwm_run options = nil
|
|
command = %w[uhwm]
|
|
command << options if options
|
|
@interactive = @process = run command.join ' '
|
|
end
|
|
|
|
def uhwm_run_wait_ready
|
|
uhwm_run
|
|
uhwm_wait_output 'Connected to'
|
|
end
|
|
|
|
Given /^uhwm is running$/ do
|
|
uhwm_run_wait_ready
|
|
end
|
|
|
|
When /^I start uhwm$/ do
|
|
uhwm_run
|
|
end
|
|
|
|
When /^I run uhwm with options? (-.+)$/ do |options|
|
|
uhwm_run options
|
|
end
|
|
|
|
Then /^the exit status must be (\d+)$/ do |exit_status|
|
|
assert_exit_status exit_status.to_i
|
|
end
|
|
|
|
Then /^uhwm should terminate successfully$/ do
|
|
assert_exit_status 0
|
|
end
|