diff options
author | Rob <bobstopper@bobturf.org> | 2007-05-25 05:54:32 +0200 |
---|---|---|
committer | Rob <bobstopper@bobturf.org> | 2007-05-25 05:54:32 +0200 |
commit | 9ddd7149444e2adb40f7ce0d88ffbcdfaff03576 (patch) | |
tree | 47d5a12179cd8c2e440e12545d589fc9c6c30dc3 /tests | |
parent | 30cf0a66c8054d7b68b277847374369599343168 (diff) | |
download | xmonad-9ddd7149444e2adb40f7ce0d88ffbcdfaff03576.tar.gz xmonad-9ddd7149444e2adb40f7ce0d88ffbcdfaff03576.tar.xz xmonad-9ddd7149444e2adb40f7ce0d88ffbcdfaff03576.zip |
Quickcheck property to check that delete / focus behaviour
See patch "Deleting a window should not affect focus". Checks this property.
darcs-hash:20070525035432-64d90-e1b1684a128a8336c14be3479b088988a5ddbd35.gz
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Properties.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/Properties.hs b/tests/Properties.hs index b93c3a6..34b6388 100644 --- a/tests/Properties.hs +++ b/tests/Properties.hs @@ -392,6 +392,9 @@ prop_delete_local (x :: T) = Nothing -> True Just i -> hidden_spaces x == hidden_spaces (delete i x) +-- delete should not affect focus unless the focused element is what is being deleted +prop_delete_focus n (x :: T) = member n x && Just n /= peek x ==> peek (delete n x) == peek x + -- --------------------------------------------------------------------- -- swapLeft, swapRight, swapMaster: reordiring windows @@ -537,6 +540,7 @@ main = do ,("delete/member" , mytest prop_delete) ,("delete is reversible", mytest prop_delete_insert) ,("delete is local" , mytest prop_delete_local) + ,("delete/focus" , mytest prop_delete_focus) ,("swapMaster: invariant", mytest prop_swap_master_I) ,("swapLeft: invariant" , mytest prop_swap_left_I) |