From 2db34f050aa250c4c11a35cb201cc1c7a28d083d Mon Sep 17 00:00:00 2001 From: Jasper Van der Jeugt Date: Mon, 17 Oct 2016 11:05:25 +0200 Subject: Move from test-framework to tasty --- tests/Hakyll/Web/CompressCss/Tests.hs | 12 ++++++------ tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs | 7 ++++--- tests/Hakyll/Web/Html/Tests.hs | 8 ++++---- tests/Hakyll/Web/Pandoc/FileType/Tests.hs | 6 +++--- tests/Hakyll/Web/Template/Context/Tests.hs | 9 ++++----- tests/Hakyll/Web/Template/Tests.hs | 8 ++++---- 6 files changed, 25 insertions(+), 25 deletions(-) (limited to 'tests/Hakyll/Web') diff --git a/tests/Hakyll/Web/CompressCss/Tests.hs b/tests/Hakyll/Web/CompressCss/Tests.hs index b356388..8521014 100644 --- a/tests/Hakyll/Web/CompressCss/Tests.hs +++ b/tests/Hakyll/Web/CompressCss/Tests.hs @@ -5,9 +5,9 @@ module Hakyll.Web.CompressCss.Tests -------------------------------------------------------------------------------- -import Data.Char (toUpper) -import Test.Framework (Test, testGroup) -import Test.HUnit (assert, (@=?)) +import Data.Char (toUpper) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit (assert, (@=?)) -------------------------------------------------------------------------------- @@ -16,10 +16,10 @@ import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat [ fromAssertions "compressCss" - [ + [ -- compress whitespace " something something " @=? compressCss " something \n\t\r something " @@ -32,7 +32,7 @@ tests = testGroup "Hakyll.Web.CompressCss.Tests" $ concat -- strip comments , "before after" @=? compressCss "before /* abc { } ;; \n\t\r */ after" -- don't strip comments inside constants - , "before \"/* abc { } ;; \n\t\r */\" after" + , "before \"/* abc { } ;; \n\t\r */\" after" @=? compressCss "before \"/* abc { } ;; \n\t\r */\" after" -- compress separators diff --git a/tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs b/tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs index 4d9421e..658145d 100644 --- a/tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs +++ b/tests/Hakyll/Web/Html/RelativizeUrls/Tests.hs @@ -6,8 +6,9 @@ module Hakyll.Web.Html.RelativizeUrls.Tests -------------------------------------------------------------------------------- -import Test.Framework (Test, testGroup) -import Test.HUnit ((@=?)) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit ((@=?)) + -------------------------------------------------------------------------------- import Hakyll.Web.Html.RelativizeUrls @@ -15,7 +16,7 @@ import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Web.Html.RelativizeUrls.Tests" $ fromAssertions "relativizeUrls" [ "bar" @=? diff --git a/tests/Hakyll/Web/Html/Tests.hs b/tests/Hakyll/Web/Html/Tests.hs index bad5ebc..efb4099 100644 --- a/tests/Hakyll/Web/Html/Tests.hs +++ b/tests/Hakyll/Web/Html/Tests.hs @@ -5,9 +5,9 @@ module Hakyll.Web.Html.Tests -------------------------------------------------------------------------------- -import Data.Char (toUpper) -import Test.Framework (Test, testGroup) -import Test.HUnit (assert, (@=?)) +import Data.Char (toUpper) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit (assert, (@=?)) -------------------------------------------------------------------------------- @@ -16,7 +16,7 @@ import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Web.Html.Tests" $ concat [ fromAssertions "demoteHeaders" [ "

A h1 title

" @=? diff --git a/tests/Hakyll/Web/Pandoc/FileType/Tests.hs b/tests/Hakyll/Web/Pandoc/FileType/Tests.hs index e6b222f..7797107 100644 --- a/tests/Hakyll/Web/Pandoc/FileType/Tests.hs +++ b/tests/Hakyll/Web/Pandoc/FileType/Tests.hs @@ -6,8 +6,8 @@ module Hakyll.Web.Pandoc.FileType.Tests -------------------------------------------------------------------------------- -import Test.Framework (Test, testGroup) -import Test.HUnit ((@=?)) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit ((@=?)) -------------------------------------------------------------------------------- @@ -16,7 +16,7 @@ import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Web.Pandoc.FileType.Tests" $ fromAssertions "fileType" [ Markdown @=? fileType "index.md" diff --git a/tests/Hakyll/Web/Template/Context/Tests.hs b/tests/Hakyll/Web/Template/Context/Tests.hs index 5f77dad..f263391 100644 --- a/tests/Hakyll/Web/Template/Context/Tests.hs +++ b/tests/Hakyll/Web/Template/Context/Tests.hs @@ -6,22 +6,21 @@ module Hakyll.Web.Template.Context.Tests -------------------------------------------------------------------------------- -import Test.Framework (Test, testGroup) -import Test.Framework.Providers.HUnit (testCase) -import Test.HUnit (Assertion, (@=?)) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit (Assertion, testCase, (@=?)) -------------------------------------------------------------------------------- import Hakyll.Core.Compiler import Hakyll.Core.Identifier import Hakyll.Core.Provider -import Hakyll.Core.Store (Store) +import Hakyll.Core.Store (Store) import Hakyll.Web.Template.Context import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Core.Template.Context.Tests" [ testCase "testDateField" testDateField ] diff --git a/tests/Hakyll/Web/Template/Tests.hs b/tests/Hakyll/Web/Template/Tests.hs index 994d9ca..1f3b25d 100644 --- a/tests/Hakyll/Web/Template/Tests.hs +++ b/tests/Hakyll/Web/Template/Tests.hs @@ -6,9 +6,9 @@ module Hakyll.Web.Template.Tests -------------------------------------------------------------------------------- -import Test.Framework (Test, testGroup) -import Test.Framework.Providers.HUnit (testCase) -import Test.HUnit (Assertion, (@=?), (@?=)) +import Test.Tasty (TestTree, testGroup) +import Test.Tasty.HUnit (Assertion, testCase, (@=?), + (@?=)) -------------------------------------------------------------------------------- @@ -25,7 +25,7 @@ import TestSuite.Util -------------------------------------------------------------------------------- -tests :: Test +tests :: TestTree tests = testGroup "Hakyll.Core.Template.Tests" $ concat [ [ testCase "case01" $ test ("template.html.out", "template.html", "example.md") , testCase "case02" $ test ("strip.html.out", "strip.html", "example.md") -- cgit v1.2.3