--------------------------------------------------------------------------------
{-# LANGUAGE OverloadedStrings #-}
module Hakyll.Web.Urls.Relativize.Tests
( tests
) where
--------------------------------------------------------------------------------
import Test.Framework (Test, testGroup)
import Test.HUnit ((@=?))
--------------------------------------------------------------------------------
import Hakyll.Web.Urls.Relativize
import TestSuite.Util
--------------------------------------------------------------------------------
tests :: Test
tests = testGroup "Hakyll.Web.Urls.Relativize.Tests" $
fromAssertions "relativizeUrls"
[ "bar" @=?
relativizeUrlsWith ".." "bar"
, "" @=?
relativizeUrlsWith "../.." ""
, "Haskell" @=?
relativizeUrlsWith "../.."
"Haskell"
, "Haskell" @=?
relativizeUrlsWith "../.."
"Haskell"
, "" @=?
relativizeUrlsWith "../.."
""
]