diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-08-30 16:29:22 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-08-30 16:44:18 -0400 |
commit | 15ea23acdb00fa964d91d440274e3a78bd115083 (patch) | |
tree | 6b3163113e7e4c252041fe7293d4ac251de64d0c /CmdLine.hs | |
parent | 7796b4c1570595bb79a9615cd2761420d2737c3e (diff) | |
download | keysafe-15ea23acdb00fa964d91d440274e3a78bd115083.tar.gz |
Added basic test suite.
Diffstat (limited to 'CmdLine.hs')
-rw-r--r-- | CmdLine.hs | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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" |