Test layout protocol for #expose message

This commit is contained in:
Thibault Jouan 2015-04-22 11:29:15 +00:00
parent 009d5dbedd
commit ddf875eab2

View File

@ -6,6 +6,9 @@ Feature: layout protocol
class Layout class Layout
def register display def register display
puts display puts display
display.create_subwindow(Uh::Geo.new(0, 0, 640, 16)).tap do |o|
o.show
end
end end
def << client def << client
@ -20,6 +23,10 @@ Feature: layout protocol
def update client def update client
puts "testing_#update_#{client.name}" puts "testing_#update_#{client.name}"
end end
def expose window
puts "testing_#expose_#{window.id}"
end
end end
""" """
@ -43,3 +50,7 @@ Feature: layout protocol
And a window is mapped And a window is mapped
When the window name changes to "testing_new_name" When the window name changes to "testing_new_name"
Then the output must contain "testing_#update_testing_new_name" Then the output must contain "testing_#update_testing_new_name"
Scenario: tells the layout about an exposed window with #expose message
Given I run uhwm with options -r./layout -l Layout
Then the output must match /testing_#expose_\d+/