Permalink
Browse files

add tests

  • Loading branch information...
1 parent 6cd9884 commit 905f90b16a536baa09082b9083185f16323c51b5 @jrockway committed Feb 22, 2009
Showing with 13 additions and 0 deletions.
  1. +13 −0 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)

0 comments on commit 905f90b

Please sign in to comment.