Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add tests

  • Loading branch information...
commit 905f90b16a536baa09082b9083185f16323c51b5 1 parent 6cd9884
@jrockway authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 client/tests/CmdLineParser.hs
View
13 client/tests/CmdLineParser.hs
@@ -0,0 +1,13 @@
+import Test.QuickCheck
+import App.Persistent.Client
+import Data.Char
+
+instance Arbitrary Char where
+ arbitrary = choose ('a', 'b')
+
+main = do
+ test prop_allArgsSelected
+ test prop_noArgsSelected
+
+prop_allArgsSelected xs = xs == (fst $ parseCmdLine ("+PC" : xs ++ ["-PC"]))
+prop_noArgsSelected xs = xs == (snd $ parseCmdLine xs)
Please sign in to comment.
Something went wrong with that request. Please try again.