on master help sign in
mask output from quickcheck. need to be replaced with one that reports output via Progress values
4aceef7Corey O'Connor
src/Graphics/Vty/Input/Terminfo/ANSIVT.hs+4−6
@@ -50,13 +50,11 @@ navKeys3 =
50
50
51-- | encoding for shift plus function keys
51-- | encoding for shift plus function keys
52--
52--
53−-- TODO: I suspect this should be generated by interpretting the terminals use of meta mode:
53+-- According to
54−-- "If the terminal has a ``meta key'' which acts as a shift key, setting the 8th bit of any
55−-- character transmitted, this fact can be indicated with km. Other- wise, software will
56−-- assume that the 8th bit is parity and it will usually be cleared. If strings exist to turn this
57−-- ``meta mode'' on and off, they can be given as smm and rmm."
58--
54--
59−-- That is more complex than below. I cannot fault the original author for just hard coding a table.
55+-- * http://aperiodic.net/phil/archives/Geekery/term-function-keys.html
56+--
57+-- This encoding depends on the terminal.
60functionKeys1 :: ClassifyTable
58functionKeys1 :: ClassifyTable
61functionKeys1 =
59functionKeys1 =
62 let f ff nrs m = [ ("\ESC["++show n++"~",EvKey (KFun $ n-(nrs!!0)+ff) m) | n <- nrs ] in
60 let f ff nrs m = [ ("\ESC["++show n++"~",EvKey (KFun $ n-(nrs!!0)+ff) m) | n <- nrs ] in
test/Verify.hs+1−1
@@ -53,7 +53,7 @@ verify :: Testable t => String -> t -> Test
53verify testName p = Test $ TestInstance
53verify testName p = Test $ TestInstance
54 { name = testName
54 { name = testName
55 , run = do
55 , run = do
56− qcResult <- quickCheckResult p
56+ qcResult <- quickCheckWithResult (stdArgs {chatty = False}) p
57 case qcResult of
57 case qcResult of
58 QC.Success {..} -> return $ Finished TS.Pass
58 QC.Success {..} -> return $ Finished TS.Pass
59 QC.Failure {numShrinks,reason} -> return $ Finished
59 QC.Failure {numShrinks,reason} -> return $ Finished
test/VerifyOutput.hs+2−2
@@ -19,7 +19,7 @@ import System.IO
19tests :: IO [Test]
19tests :: IO [Test]
20tests = concat <$> forM terminalsOfInterest (\termName -> do
20tests = concat <$> forM terminalsOfInterest (\termName -> do
21 -- check if that terminfo exists
21 -- check if that terminfo exists
22− putStrLn $ "testing end to end for terminal: " ++ termName
22+ -- putStrLn $ "testing end to end for terminal: " ++ termName
23 mti <- try $ Terminfo.setupTerm termName
23 mti <- try $ Terminfo.setupTerm termName
24 case mti of
24 case mti of
25 Left (_ :: SomeException) -> return []
25 Left (_ :: SomeException) -> return []
@@ -47,7 +47,7 @@ smokeTestTerm :: String -> Image -> IO Result
47smokeTestTerm termName i = do
47smokeTestTerm termName i = do
48 nullOut <- openFile "/dev/null" WriteMode
48 nullOut <- openFile "/dev/null" WriteMode
49 t <- outputForNameAndIO termName nullOut
49 t <- outputForNameAndIO termName nullOut
50− putStrLn $ "context color count: " ++ show (contextColorCount t)
50+ -- putStrLn $ "context color count: " ++ show (contextColorCount t)
51 reserveDisplay t
51 reserveDisplay t
52 dc <- displayContext t (100,100)
52 dc <- displayContext t (100,100)
53 -- always show the cursor to produce tests for terminals with no cursor support.
53 -- always show the cursor to produce tests for terminals with no cursor support.