From 15ea23acdb00fa964d91d440274e3a78bd115083 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 30 Aug 2016 16:29:22 -0400 Subject: Added basic test suite. --- CmdLine.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'CmdLine.hs') diff --git a/CmdLine.hs b/CmdLine.hs index 62f6887..a8201c8 100644 --- a/CmdLine.hs +++ b/CmdLine.hs @@ -23,7 +23,7 @@ data CmdLine = CmdLine , serverConfig :: ServerConfig } -data Mode = Backup | Restore | UploadQueued | Server | Benchmark +data Mode = Backup | Restore | UploadQueued | Server | Benchmark | Test deriving (Show) data ServerConfig = ServerConfig @@ -33,7 +33,7 @@ data ServerConfig = ServerConfig parse :: Parser CmdLine parse = CmdLine - <$> optional (backup <|> restore <|> uploadqueued <|> server <|> benchmark) + <$> optional (backup <|> restore <|> uploadqueued <|> server <|> benchmark <|> test) <*> optional (gpgswitch <|> fileswitch) <*> localstorageswitch <*> guiswitch @@ -61,6 +61,10 @@ parse = CmdLine ( long "benchmark" <> help "Benchmark speed of keysafe's cryptographic primitives." ) + test = flag' Test + ( long "test" + <> help "Run test suite." + ) gpgswitch = GpgKey . KeyId . BU8.fromString <$> strOption ( long "gpgkeyid" <> metavar "KEYID" -- cgit v1.2.3