1-- We setup the environment to envoke certain terminals of interest.
2-- This assumes appropriate definitions exist in the current environment
3-- for the terminals of interest.
4module VerifyOutput where
10import Verify.Graphics.Vty.Image
11import Verify.Graphics.Vty.Output
15import qualified System.Console.Terminfo as Terminfo
16import System.Posix.Env
20tests = concat <$> forM terminalsOfInterest (\termName -> do
21 -- check if that terminfo exists
22 -- putStrLn $ "testing end to end for terminal: " ++ termName
23 mti <- try $ Terminfo.setupTerm termName
25 Left (_ :: SomeException) -> return []
26 Right _ -> return [ verify ("verify " ++ termName ++ " could output a picture")
27 (smokeTestTermNonMac termName)
31smokeTestTermNonMac :: String -> Image -> Property
32smokeTestTermNonMac termName i = liftIOResult $ do
33 smokeTestTerm termName i
35smokeTestTerm :: String -> Image -> IO Result
36smokeTestTerm termName i = do
37 nullOut <- openFd "/dev/null" WriteOnly Nothing defaultFileFlags
38 t <- outputForConfig $ defaultConfig { outputFd = Just nullOut, termName = Just termName }
39 -- putStrLn $ "context color count: " ++ show (contextColorCount t)
41 dc <- displayContext t (100,100)
42 -- always show the cursor to produce tests for terminals with no
44 let pic = (picForImage i) { picCursor = Cursor 0 0 }
47 when (supportsCursorVisibility t) $ do
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list