summaryrefslogtreecommitdiffhomepage
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-30 16:29:22 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-30 16:44:18 -0400
commit15ea23acdb00fa964d91d440274e3a78bd115083 (patch)
tree6b3163113e7e4c252041fe7293d4ac251de64d0c /CmdLine.hs
parent7796b4c1570595bb79a9615cd2761420d2737c3e (diff)
downloadkeysafe-15ea23acdb00fa964d91d440274e3a78bd115083.tar.gz
Added basic test suite.
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"