on master help sign in
Incluse test data in cabal
commit81837842ec92e54f60a824968c208a7a4deba0f0 authoriko <ilyakooo0@gmail.com> dateThu 30 Dec 2021, 13:44 (5 years ago) parent51a4ecd
2 files changed+9−3
compaREST.cabal+4 test/Spec/Golden/TraceTree.hs+5−3
compaREST.cabal+4
@@ -14,6 +14,9 @@ extra-doc-files: README.md
1414 CHANGELOG.md
1515tested-with: GHC == 8.10.4
1616extra-source-files: awsm-css/dist/awsm.min.css
17+data-files:
18+ test/golden/**/*.yaml
19+ test/golden/**/*.md
1720
1821common common-options
1922 ghc-options:
@@ -203,6 +206,7 @@ test-suite compaREST-tests
203206 other-modules:
204207 Spec.Golden.Extra
205208 Spec.Golden.TraceTree
209+ Paths_compaREST
206210 build-depends:
207211 , compaREST
208212 , tasty-golden
test/Spec/Golden/TraceTree.hs+5−3
@@ -1,5 +1,5 @@
11module Spec.Golden.TraceTree
2− ( tests,
2+ ( tests
33 )
44where
55
@@ -12,6 +12,7 @@ import Data.OpenApi.Compare.Validate.OpenApi ()
1212import Data.Text (Text)
1313import qualified Data.Text.Encoding as T
1414import qualified Data.Yaml as Yaml
15+import Paths_compaREST
1516import Spec.Golden.Extra
1617import Test.Tasty (TestTree, testGroup)
1718import Text.Pandoc.Builder
@@ -22,10 +23,11 @@ import Prelude hiding (id, (.))
2223
2324tests :: IO TestTree
2425tests = do
26+ dir <- getDataDir
2527 traceTreeTests <-
2628 goldenInputsTreeUniform
2729 "TraceTree"
28− "test/golden/common"
30+ dir
2931 "trace-tree.yaml"
3032 ("a.yaml", "b.yaml")
3133 Yaml.decodeFileThrow
@@ -34,7 +36,7 @@ tests = do
3436 reportTests <-
3537 goldenInputsTreeUniform
3638 "Report"
37− "test/golden/common"
39+ dir
3840 "report.md"
3941 ("a.yaml", "b.yaml")
4042 Yaml.decodeFileThrow