mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
tests/test_XPrompt can build now.
This commit is contained in:
parent
2477f81f73
commit
9372aac28e
@ -10,8 +10,8 @@ import Test.QuickCheck
|
|||||||
|
|
||||||
import Data.List
|
import Data.List
|
||||||
|
|
||||||
import XMonad.XPrompt
|
import XMonad.Prompt
|
||||||
import qualified XMonad.ShellPrompt as S
|
import qualified XMonad.Prompt.Shell as S
|
||||||
|
|
||||||
instance Arbitrary Char where
|
instance Arbitrary Char where
|
||||||
arbitrary = choose ('\32', '\255')
|
arbitrary = choose ('\32', '\255')
|
||||||
@ -50,26 +50,27 @@ elemGen = do
|
|||||||
e <- elements l
|
e <- elements l
|
||||||
return (l,e)
|
return (l,e)
|
||||||
|
|
||||||
|
{- newIndex and newCommand have since been renamed or are no longer used
|
||||||
|
|
||||||
-- newIndex calculates the index of the next completion in the
|
-- newIndex calculates the index of the next completion in the
|
||||||
-- completion list, so the index must be within the range of the
|
-- completion list, so the index must be within the range of the
|
||||||
-- copletions list
|
-- copletions list
|
||||||
prop_newIndex_range =
|
prop_newIndex_range =
|
||||||
forAll elemGen $ \(l,c) -> newIndex c l >= 0 && newIndex c l < length l
|
forAll elemGen $ \(l,c) -> newIndex c l >= 0 && newIndex c l < length l
|
||||||
|
-}
|
||||||
|
|
||||||
-- this is actually the definition of newCommand...
|
-- this is actually the definition of newCommand...
|
||||||
-- just to check something.
|
-- just to check something.
|
||||||
|
{-
|
||||||
prop_newCommandIndex =
|
prop_newCommandIndex =
|
||||||
forAll elemGen $ \(l,c) -> (skipLastWord c ++ (l !! (newIndex c l))) == newCommand c l
|
forAll elemGen $ \(l,c) -> (skipLastWord c ++ (l !! (newIndex c l))) == newCommand c l
|
||||||
|
-}
|
||||||
|
|
||||||
main = do
|
main = do
|
||||||
putStrLn "Testing ShellPrompt.split"
|
putStrLn "Testing ShellPrompt.split"
|
||||||
deepCheck prop_split
|
deepCheck prop_split
|
||||||
putStrLn "Testing spliInSubListsAt"
|
putStrLn "Testing spliInSubListsAt"
|
||||||
deepCheck prop_spliInSubListsAt
|
deepCheck prop_spliInSubListsAt
|
||||||
putStrLn "Testing newIndex + newCommand"
|
|
||||||
deepCheck prop_newCommandIndex
|
|
||||||
putStrLn "Testing skip + get lastWord"
|
putStrLn "Testing skip + get lastWord"
|
||||||
deepCheck prop_skipGetLastWord
|
deepCheck prop_skipGetLastWord
|
||||||
putStrLn "Testing range of XPrompt.newIndex"
|
|
||||||
deepCheck prop_newIndex_range
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user