Fail when another window manager is already running
This commit is contained in:
@@ -2,7 +2,7 @@ def uhwm_wait_output message, timeout: 1
|
||||
Timeout.timeout(timeout) do
|
||||
loop do
|
||||
break if case message
|
||||
when Regexp then @process.read_stdout =~ message
|
||||
when Regexp then @process.stdout + @process.stderr =~ message
|
||||
when String then assert_partial_output_interactive message
|
||||
end
|
||||
sleep 0.1
|
||||
@@ -28,6 +28,10 @@ options:
|
||||
eoh
|
||||
end
|
||||
|
||||
Then /^the output must match \/([^\/]+)\/([a-z]*)$/ do |pattern, options|
|
||||
expect(@process.stdout).to match Regexp.new(pattern, options)
|
||||
end
|
||||
|
||||
Then /^the current output must match \/([^\/]+)\/([a-z]*)$/ do |pattern, options|
|
||||
uhwm_wait_output Regexp.new(pattern, options)
|
||||
end
|
||||
|
@@ -9,6 +9,10 @@ def uhwm_run_wait_ready
|
||||
uhwm_wait_output 'Connected to'
|
||||
end
|
||||
|
||||
Given /^another window manager is running$/ do
|
||||
expect(@other_wm).to be_alive
|
||||
end
|
||||
|
||||
Given /^uhwm is running$/ do
|
||||
uhwm_run_wait_ready
|
||||
end
|
||||
|
Reference in New Issue
Block a user