Commit f9332b80 authored by Alfredo Di Napoli's avatar Alfredo Di Napoli

Use goldenVsString

Using goldenVsStringDiff creates problems with CI trying to locale
`gargantext-cli -- golden-file-diff`.
parent 8d07ed51
Pipeline #6303 passed with stages
in 27 minutes and 24 seconds
...@@ -37,7 +37,7 @@ cabal: ...@@ -37,7 +37,7 @@ cabal:
- .cabal/ - .cabal/
policy: pull-push policy: pull-push
script: script:
- nix-shell --run "./bin/update-project-dependencies $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'" - nix-shell --run "./bin/update-project-dependencies $CABAL_STORE_DIR && cabal --store-dir=$CABAL_STORE_DIR v2-build all --flags 'test-crypto no-phylo-debug-logs' --ghc-options='-O0 -fclear-plugins'"
allow_failure: false allow_failure: false
bench: bench:
......
...@@ -8,26 +8,14 @@ import Data.Text qualified as T ...@@ -8,26 +8,14 @@ import Data.Text qualified as T
import Gargantext.Core.Text.Terms.Mono.Stem.Internal.Lancaster (stem) import Gargantext.Core.Text.Terms.Mono.Stem.Internal.Lancaster (stem)
import Gargantext.Prelude (toS) import Gargantext.Prelude (toS)
import Test.Tasty import Test.Tasty
import Test.Tasty.Golden (goldenVsStringDiff) import Test.Tasty.Golden (goldenVsString)
import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Lazy as BL
import qualified Data.Text.Encoding as TE import qualified Data.Text.Encoding as TE
tests :: TestTree tests :: TestTree
tests = testGroup "Lancaster" [ tests = testGroup "Lancaster" [
goldenVsStringDiff "test vector works" (\ref new -> [ goldenVsString "test vector works" "test-data/stemming/lancaster.txt" mkTestVector
"cabal"
, "v2-run"
, "-v0"
, "--"
, "gargantext-cli"
, "golden-file-diff"
, "--expected"
, ref
, "--actual"
, new
]) "test-data/stemming/lancaster.txt" mkTestVector
] ]
-- | List un /unstemmed/ test words -- | List un /unstemmed/ test words
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment