Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,22 @@ matrix:
packages:
- ghc-8.2.1
- cabal-install-1.24
- env: GHCVER=8.4.1 CABALVER=head
- env: GHCVER=8.4.4 CABALVER=2.4
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-8.4.1
- cabal-install-head
- env: GHCVER=8.6.1 CABALVER=head
- ghc-8.4.4
- cabal-install-2.4
- env: GHCVER=8.6.3 CABALVER=2.4
addons:
apt:
sources:
- hvr-ghc
packages:
- ghc-8.6.1
- cabal-install-head
- ghc-8.6.3
- cabal-install-2.4
- env: GHCVER=head CABALVER=head
addons:
apt:
Expand Down
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Changes in 0.16.1
- Remove dependency on `with-location`

Changes in 0.16.0.1
- Bump bounds to allow GHC 8.6. (#210)

Expand Down
7 changes: 3 additions & 4 deletions doctest.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash: d830267b38357e2e5f17c55764df93c08d2c7b450b12cba13fc0795f21a39202
-- hash: 308fb463b60673094295b281c85b97309cc0825bc789bb621c293947dd2efbac

name: doctest
version: 0.16.0.1
version: 0.16.1
synopsis: Test interactive Haskell examples
description: The doctest program checks examples in source code comments. It is modeled
after doctest for Python (<http://docs.python.org/library/doctest.html>).
Expand Down Expand Up @@ -239,13 +239,12 @@ test-suite spec
, filepath
, ghc >=7.0 && <8.7
, ghc-paths >=0.1.0.9
, hspec >=1.5.1
, hspec >=2.3.0
, mockery
, process
, setenv
, silently >=1.2.4
, stringbuilder >=0.4
, syb >=0.3
, transformers
, with-location
default-language: Haskell2010
5 changes: 2 additions & 3 deletions package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: doctest
version: 0.16.0.1
version: 0.16.1
synopsis: Test interactive Haskell examples
description: |
The doctest program checks examples in source code comments. It is modeled
Expand Down Expand Up @@ -64,12 +64,11 @@ tests:
c-sources: test/integration/with-cbits/foo.c
dependencies:
- HUnit
- hspec >= 1.5.1
- hspec >= 2.3.0
- QuickCheck >= 2.11.3
- stringbuilder >= 0.4
- silently >= 1.2.4
- setenv
- with-location
- mockery

doctests:
Expand Down
4 changes: 2 additions & 2 deletions test/ExtractSpec.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
module ExtractSpec (main, spec) where

import Test.Hspec
import Test.HUnit
import Data.WithLocation

import Panic (GhcException (..))

Expand All @@ -13,7 +13,7 @@ import System.FilePath

import Orphans ()

shouldGive :: WithLocation ((String, String) -> [Module String] -> Assertion)
shouldGive :: HasCallStack => (String, String) -> [Module String] -> Assertion
(d, m) `shouldGive` expected = do
r <- map (fmap unLoc) `fmap` extract ["-i" ++ dir, dir </> m]
r `shouldBe` expected
Expand Down
6 changes: 3 additions & 3 deletions test/MainSpec.hs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE ConstraintKinds #-}
module MainSpec (main, spec) where

import Test.Hspec
import Test.HUnit (assertEqual, Assertion)
import Data.WithLocation

import Control.Exception
import System.Directory (getCurrentDirectory, setCurrentDirectory)
Expand All @@ -21,10 +21,10 @@ withCurrentDirectory workingDir action = do
action

-- | Construct a doctest specific 'Assertion'.
doctest :: WithLocation (FilePath -> [String] -> Summary -> Assertion)
doctest :: HasCallStack => FilePath -> [String] -> Summary -> Assertion
doctest = doctestWithPreserveIt defaultPreserveIt

doctestWithPreserveIt :: WithLocation (Bool -> FilePath -> [String] -> Summary -> Assertion)
doctestWithPreserveIt :: HasCallStack => Bool -> FilePath -> [String] -> Summary -> Assertion
doctestWithPreserveIt preserveIt workingDir args expected = do
actual <- withCurrentDirectory ("test/integration" </> workingDir) (hSilence [stderr] $ doctestWithOptions defaultFastMode preserveIt defaultVerbose args)
assertEqual label expected actual
Expand Down