module Lentil.ArgsSpec where import Test.Hspec import Lentil.Types import Lentil.Query import Lentil.Args -- TEST VARS -- testOpt :: LOptions testOpt = LOptions (["alpha"], ["beta"]) Csv [filterFilepath "al", negFilter . filterTags $ "."] [] [("qq","s")] (Just "foo.txt") ins :: [String] ins = words "alpha --format csv -x beta -p al -t ^ --a qq-s --output foo.txt" -- out :: Maybe LOptions -- out = getParseResult . -- execParserPure M.mempty (info lOpts (fullDesc)) $ ins -- TESTING -- main :: IO () main = hspec spec spec :: Spec spec = do describe "lOpts" $ do it "parses options" $ ins `shouldBe` ins --error "args" --out `shouldBe` Just testOpt -- TODO: real parsing testing options [test]