on master help sign in
mask output from quickcheck. need to be replaced with one that reports output via Progress values
commit4aceef7a7f78af2099e5a971e4759c05026bcf12 authorCorey O'Connor <coreyoconnor@gmail.com> dateSat 31 May 2014, 01:52 (12 years ago) parent7d434d3
3 files changed+7−9
src/Graphics/Vty/Input/Terminfo/ANSIVT.hs+4−6 test/Verify.hs+1−1 test/VerifyOutput.hs+2−2
src/Graphics/Vty/Input/Terminfo/ANSIVT.hs+4−6
@@ -50,13 +50,11 @@ navKeys3 =
5050
5151-- | encoding for shift plus function keys
5252--
53−-- TODO: I suspect this should be generated by interpretting the terminals use of meta mode:
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."
53+-- According to
5854--
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.
6058functionKeys1 :: ClassifyTable
6159functionKeys1 =
6260 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
5353verify testName p = Test $ TestInstance
5454 { name = testName
5555 , run = do
56− qcResult <- quickCheckResult p
56+ qcResult <- quickCheckWithResult (stdArgs {chatty = False}) p
5757 case qcResult of
5858 QC.Success {..} -> return $ Finished TS.Pass
5959 QC.Failure {numShrinks,reason} -> return $ Finished
test/VerifyOutput.hs+2−2
@@ -19,7 +19,7 @@ import System.IO
1919tests :: IO [Test]
2020tests = concat <$> forM terminalsOfInterest (\termName -> do
2121 -- check if that terminfo exists
22− putStrLn $ "testing end to end for terminal: " ++ termName
22+ -- putStrLn $ "testing end to end for terminal: " ++ termName
2323 mti <- try $ Terminfo.setupTerm termName
2424 case mti of
2525 Left (_ :: SomeException) -> return []
@@ -47,7 +47,7 @@ smokeTestTerm :: String -> Image -> IO Result
4747smokeTestTerm termName i = do
4848 nullOut <- openFile "/dev/null" WriteMode
4949 t <- outputForNameAndIO termName nullOut
50− putStrLn $ "context color count: " ++ show (contextColorCount t)
50+ -- putStrLn $ "context color count: " ++ show (contextColorCount t)
5151 reserveDisplay t
5252 dc <- displayContext t (100,100)
5353 -- always show the cursor to produce tests for terminals with no cursor support.