on master help sign in
Outline two test suites we will need
1941338mrkkrp
httpbin-tests/Network/HTTP/ReqSpec.hsnew file+41
@@ -0,0 +1,41 @@
1+--
2+-- Tests for ‘req’ package. This test suite tests sending actual requests
3+-- using the <https://httpbin.org> service.
4+--
5+-- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
6+--
7+-- Redistribution and use in source and binary forms, with or without
8+-- modification, are permitted provided that the following conditions are
9+-- met:
10+--
11+-- * Redistributions of source code must retain the above copyright notice,
12+-- this list of conditions and the following disclaimer.
13+--
14+-- * Redistributions in binary form must reproduce the above copyright
15+-- notice, this list of conditions and the following disclaimer in the
16+-- documentation and/or other materials provided with the distribution.
17+--
18+-- * Neither the name Mark Karpov nor the names of contributors may be used
19+-- to endorse or promote products derived from this software without
20+-- specific prior written permission.
21+--
22+-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS “AS IS” AND ANY
23+-- EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
24+-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25+-- DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
26+-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27+-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28+-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29+-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
30+-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31+-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+-- POSSIBILITY OF SUCH DAMAGE.
33+
34+module Network.HTTP.ReqSpec
35+ ( spec )
36+where
37+
38+import Test.Hspec
39+
40+spec :: Spec
41+spec = return ()
tests/Spec.hs → httpbin-tests/Spec.hsrenamed

The content is the same.

tests/Network/HTTP/ReqSpec.hs → pure-tests/Network/HTTP/ReqSpec.hsrenamed+2−1
@@ -1,5 +1,6 @@
1--
1--
2−-- Tests for ‘req’ package.
2+-- Tests for ‘req’ package. This test suite tests correctness of constructed
3+-- requests.
3--
4--
4-- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
5-- Copyright © 2016 Mark Karpov <markkarpov@openmailbox.org>
5--
6--
pure-tests/Spec.hsnew file+1
@@ -0,0 +1 @@
1+{-# OPTIONS_GHC -F -pgmF hspec-discover #-}
req.cabal+17−3
@@ -82,12 +82,12 @@ library
82 ghc-options: -O2 -Wall
82 ghc-options: -O2 -Wall
83 default-language: Haskell2010
83 default-language: Haskell2010
84
84
85−test-suite tests
85+test-suite pure-tests
86 main-is: Spec.hs
86 main-is: Spec.hs
87 other-modules: Network.HTTP.ReqSpec
87 other-modules: Network.HTTP.ReqSpec
88− hs-source-dirs: tests
88+ hs-source-dirs: pure-tests
89 type: exitcode-stdio-1.0
89 type: exitcode-stdio-1.0
90− build-depends: QuickCheck >= 2.7 && < 3.0
90+ build-depends: QuickCheck >= 2.7 && < 3.0
91 , base >= 4.7 && < 5.0
91 , base >= 4.7 && < 5.0
92 , hspec >= 2.0 && < 3.0
92 , hspec >= 2.0 && < 3.0
93 , req >= 0.1.0
93 , req >= 0.1.0
@@ -96,3 +96,17 @@ test-suite tests
96 else
96 else
97 ghc-options: -O2 -Wall
97 ghc-options: -O2 -Wall
98 default-language: Haskell2010
98 default-language: Haskell2010
99+
100+test-suite httpbin-tests
101+ main-is: Spec.hs
102+ other-modules: Network.HTTP.ReqSpec
103+ hs-source-dirs: httpbin-tests
104+ type: exitcode-stdio-1.0
105+ build-depends: base >= 4.7 && < 5.0
106+ , hspec >= 2.0 && < 3.0
107+ , req >= 0.1.0
108+ if flag(dev)
109+ ghc-options: -Wall -Werror
110+ else
111+ ghc-options: -O2 -Wall
112+ default-language: Haskell2010