Incluse test data in cabal

This commit is contained in:
iko 2021-12-30 13:44:13 +03:00
parent 51a4ecd6ec
commit 81837842ec
Signed by untrusted user: iko
GPG Key ID: 82C257048D1026F2
2 changed files with 9 additions and 3 deletions

View File

@ -14,6 +14,9 @@ extra-doc-files: README.md
CHANGELOG.md
tested-with: GHC == 8.10.4
extra-source-files: awsm-css/dist/awsm.min.css
data-files:
test/golden/**/*.yaml
test/golden/**/*.md
common common-options
ghc-options:
@ -203,6 +206,7 @@ test-suite compaREST-tests
other-modules:
Spec.Golden.Extra
Spec.Golden.TraceTree
Paths_compaREST
build-depends:
, compaREST
, tasty-golden

View File

@ -1,5 +1,5 @@
module Spec.Golden.TraceTree
( tests,
( tests
)
where
@ -12,6 +12,7 @@ import Data.OpenApi.Compare.Validate.OpenApi ()
import Data.Text (Text)
import qualified Data.Text.Encoding as T
import qualified Data.Yaml as Yaml
import Paths_compaREST
import Spec.Golden.Extra
import Test.Tasty (TestTree, testGroup)
import Text.Pandoc.Builder
@ -22,10 +23,11 @@ import Prelude hiding (id, (.))
tests :: IO TestTree
tests = do
dir <- getDataDir
traceTreeTests <-
goldenInputsTreeUniform
"TraceTree"
"test/golden/common"
dir
"trace-tree.yaml"
("a.yaml", "b.yaml")
Yaml.decodeFileThrow
@ -34,7 +36,7 @@ tests = do
reportTests <-
goldenInputsTreeUniform
"Report"
"test/golden/common"
dir
"report.md"
("a.yaml", "b.yaml")
Yaml.decodeFileThrow