File: unittests.hs

package info (click to toggle)
haskell-prettyprinter-interp 0.2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 80 kB
  • sloc: haskell: 70; makefile: 6
file content (29 lines) | stat: -rw-r--r-- 551 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{-|
  Copyright   :  (C) 2022     , Peter Lebbing
  License     :  BSD2 (see the file LICENSE)
  Maintainer  :  Peter Lebbing <peter@digitalbrains.com>
-}

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}

module Main where

import Data.Text (Text)
import Test.Tasty
import Test.Tasty.HUnit

import Prettyprinter.Interpolate

f :: Text
f = "world"

basicFunc :: Assertion
basicFunc = show [di|Hello #{f}!|] @?= "Hello world!"

tests :: TestTree
tests =
  testCase "Basic functionality" basicFunc

main :: IO ()
main = defaultMain tests