-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow passing extra arguments to the doctest test suites
- Loading branch information
Showing
4 changed files
with
42 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
module Main where | ||
module Main (main) where | ||
|
||
import System.FilePath ((</>)) | ||
|
||
import qualified GHC.IO.Encoding | ||
import qualified System.Directory | ||
import qualified System.Environment | ||
import qualified System.IO | ||
import qualified Test.DocTest | ||
|
||
main :: IO () | ||
main = do | ||
GHC.IO.Encoding.setLocaleEncoding System.IO.utf8 | ||
pwd <- System.Directory.getCurrentDirectory | ||
args <- System.Environment.getArgs | ||
pwd <- System.Directory.getCurrentDirectory | ||
prefix <- System.Directory.makeAbsolute pwd | ||
Test.DocTest.doctest | ||
let src = prefix </> "src" | ||
|
||
Test.DocTest.doctest $ | ||
[ "--fast" | ||
, prefix </> "src" | ||
] <> args <> | ||
[ src | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,26 @@ | ||
module Main where | ||
module Main (main) where | ||
|
||
import System.FilePath ((</>)) | ||
|
||
import qualified GHC.IO.Encoding | ||
import qualified System.Directory | ||
import qualified System.Environment | ||
import qualified System.IO | ||
import qualified Test.DocTest | ||
|
||
main :: IO () | ||
main = do | ||
|
||
GHC.IO.Encoding.setLocaleEncoding System.IO.utf8 | ||
pwd <- System.Directory.getCurrentDirectory | ||
args <- System.Environment.getArgs | ||
pwd <- System.Directory.getCurrentDirectory | ||
prefix <- System.Directory.makeAbsolute pwd | ||
let src = prefix </> "src" | ||
|
||
Test.DocTest.doctest | ||
Test.DocTest.doctest $ | ||
[ "--fast" | ||
, "-XOverloadedStrings" | ||
, "-XRecordWildCards" | ||
, "-i" <> (prefix </> "src") | ||
, prefix </> "src/Dhall/LSP/Backend/Diagnostics.hs" | ||
] <> args <> | ||
[ "-i" <> src | ||
, src </> "Dhall/LSP/Backend/Diagnostics.hs" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
module Main where | ||
module Main (main) where | ||
|
||
import System.FilePath ((</>)) | ||
|
||
import qualified GHC.IO.Encoding | ||
import qualified System.Directory | ||
import qualified System.Environment | ||
import qualified System.IO | ||
import qualified Test.DocTest | ||
|
||
main :: IO () | ||
main = do | ||
GHC.IO.Encoding.setLocaleEncoding System.IO.utf8 | ||
args <- System.Environment.getArgs | ||
pwd <- System.Directory.getCurrentDirectory | ||
prefix <- System.Directory.makeAbsolute pwd | ||
let src = prefix </> "src" | ||
Test.DocTest.doctest [ "--fast", "-i" <> src, src ] | ||
|
||
Test.DocTest.doctest $ | ||
[ "--fast" | ||
] <> args <> | ||
[ "-i" <> src | ||
, src | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters