Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix brittle test #152

Merged
merged 2 commits into from
Jul 3, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
- "9.8"
- "9.10"
include:
- { os: macOS-latest, ghc: "9.8" }
- { os: windows-latest, ghc: "9.8" }
- { os: macOS-latest, ghc: "9.10" }
- { os: windows-latest, ghc: "9.10" }

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
steps:
- uses: nikeee/setup-pandoc@v1

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
Expand Down
15 changes: 3 additions & 12 deletions test/suite/Heist/Tests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,25 +48,16 @@ tests = [ testCase "loadErrors" loadErrorsTest
loadErrorsTest :: H.Assertion
loadErrorsTest = do
ets <- loadIO "templates-bad" mempty mempty mempty mempty
either (H.assertEqual "load errors test" expected . sort)
either (H.assertEqual "load errors test" expected . fmap (head . lines) . sort)
(const $ H.assertFailure "No failure when loading templates-bad")
ets
where
expected = sort
#if MIN_VERSION_base(4,9,0)
["templates-bad/apply-missing-attr.tpl: must supply \"template\" attribute in <apply>\nCallStack (from HasCallStack):\n error, called at src/Heist/Common.hs:76:15 in main:Heist.Common"
,"templates-bad/apply-template-not-found.tpl: apply tag cannot find template \"/page\"\nCallStack (from HasCallStack):\n error, called at src/Heist/Common.hs:76:15 in main:Heist.Common"
,"templates-bad/bind-infinite-loop.tpl: template recursion exceeded max depth, you probably have infinite splice recursion!\nCallStack (from HasCallStack):\n error, called at src/Heist/Common.hs:76:15 in main:Heist.Common"
,"templates-bad/bind-missing-attr.tpl: must supply \"tag\" attribute in <bind>\nCallStack (from HasCallStack):\n error, called at src/Heist/Common.hs:76:15 in main:Heist.Common"
]
#else
["templates-bad/bind-infinite-loop.tpl: template recursion exceeded max depth, you probably have infinite splice recursion!"
["templates-bad/apply-missing-attr.tpl: must supply \"template\" attribute in <apply>"
,"templates-bad/apply-template-not-found.tpl: apply tag cannot find template \"/page\""
,"templates-bad/bind-infinite-loop.tpl: template recursion exceeded max depth, you probably have infinite splice recursion!"
,"templates-bad/bind-missing-attr.tpl: must supply \"tag\" attribute in <bind>"
,"templates-bad/apply-missing-attr.tpl: must supply \"template\" attribute in <apply>"
]
#endif


attrSpliceTest :: IO ()
attrSpliceTest = do
Expand Down
Loading