summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs8
1 files changed, 6 insertions, 2 deletions
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"