mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-01 12:41:53 -07:00
test lookupWorkspace more deeply
This commit is contained in:
@@ -555,6 +555,15 @@ prop_lookup_current (x :: T) = lookupWorkspace scr x == Just tg
|
|||||||
where
|
where
|
||||||
(Screen (Workspace tg _ _) scr _) = current x
|
(Screen (Workspace tg _ _) scr _) = current x
|
||||||
|
|
||||||
|
-- looking at a visible tag
|
||||||
|
prop_lookup_visible (x :: T) =
|
||||||
|
visible x /= [] ==>
|
||||||
|
fromJust (lookupWorkspace scr x) `elem` tags
|
||||||
|
where
|
||||||
|
tags = [ tag (workspace y) | y <- visible x ]
|
||||||
|
scr = last [ screen y | y <- visible x ]
|
||||||
|
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- testing for failure
|
-- testing for failure
|
||||||
|
|
||||||
@@ -706,6 +715,7 @@ main = do
|
|||||||
,("screens includes current", mytest prop_screens)
|
,("screens includes current", mytest prop_screens)
|
||||||
,("differentiate works", mytest prop_differentiate)
|
,("differentiate works", mytest prop_differentiate)
|
||||||
,("lookupTagOnScreen", mytest prop_lookup_current)
|
,("lookupTagOnScreen", mytest prop_lookup_current)
|
||||||
|
,("lookupTagOnVisbleScreen", mytest prop_lookup_visible)
|
||||||
|
|
||||||
-- testing for failure:
|
-- testing for failure:
|
||||||
,("abort fails", mytest prop_abort)
|
,("abort fails", mytest prop_abort)
|
||||||
|
Reference in New Issue
Block a user