From 6a1fee251bd63e451c60c46a68a7ed9c22a0b447 Mon Sep 17 00:00:00 2001 From: Marco Zocca Date: Fri, 1 Dec 2023 07:06:40 +0100 Subject: [PATCH] WIP example docstrings using curl should be ported to use hspec-wai --- doctest/Main.hs | 10 ++++++++++ scotty.cabal | 8 ++++++++ 2 files changed, 18 insertions(+) create mode 100644 doctest/Main.hs diff --git a/doctest/Main.hs b/doctest/Main.hs new file mode 100644 index 00000000..656ceb81 --- /dev/null +++ b/doctest/Main.hs @@ -0,0 +1,10 @@ +module Main where + +import Test.DocTest (doctest) + +main :: IO () +main = doctest [ + "Web" + , "-XOverloadedStrings" + , "-XLambdaCase" + ] diff --git a/scotty.cabal b/scotty.cabal index 97b2cd12..bd0a1b4f 100644 --- a/scotty.cabal +++ b/scotty.cabal @@ -122,6 +122,14 @@ test-suite spec build-tool-depends: hspec-discover:hspec-discover == 2.* GHC-options: -Wall -threaded -fno-warn-orphans +test-suite doctest + main-is: Main.hs + type: exitcode-stdio-1.0 + default-language: Haskell2010 + hs-source-dirs: doctest + build-depends: base + , doctest + benchmark weigh main-is: Main.hs type: exitcode-stdio-1.0