diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-19 16:17:31 +0100 |
---|---|---|
committer | Will Thompson <will.thompson@collabora.co.uk> | 2011-09-19 16:17:31 +0100 |
commit | f6a3d8f8d68fa12be1d3959fcb8699e9e6fc76fb (patch) | |
tree | a640c30d0d980462bc093354372295ca73922386 | |
parent | 0f0c07ffe1e0e53e3a919b590e06adc8cda53340 (diff) |
Make help output more whimsical.
-rwxr-xr-x | tt.hs | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -16,6 +16,9 @@ import System.IO (hPutStr, hPutStrLn, stderr) import System.Process import System.Exit +import Data.Version (showVersion) +import Paths_tt (version) + type Flag = String data Repetitions = Forever | Times Int @@ -152,7 +155,25 @@ main = do _ | not (null errors) -> do mapM_ (hPutStr stderr) $ errors ++ [usage] exitFailure - ShowHelp -> putStr usage + ShowHelp -> do + mapM_ putStrLn + [ "‘tt’ version " ++ showVersion version ++ + " runs Telepathy components’ Twisted tests." + , "Famed around the globe for its succinct ease-of-use." + , "Get your free copy today!" + , "" + , usage + , "Examples:" + , " # Run all tests, as a shorthand for `make check`:" + , " tt" + , " # Run a single test:" + , " tt muc/banned.py" + , " tt muc/banned" + , " # Run all tests in a directory:" + , " tt muc/" + , " # Run a bunch of tests:" + , " tt muc/ text/" + ] _ | isNothing testVar -> do hPutStrLn stderr "no tests here :'(" exitFailure |