graphql/tests/Language/GraphQL/THSpec.hs
Eugen Wissner c760bc7b88
All checks were successful
Build / audit (push) Successful in 17s
Build / test (push) Successful in 6m10s
Build / doc (push) Successful in 5m8s
Remove cariage return from the qq string
2024-08-04 08:11:45 +02:00

25 lines
671 B
Haskell

{- This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can
obtain one at https://mozilla.org/MPL/2.0/. -}
{-# LANGUAGE QuasiQuotes #-}
module Language.GraphQL.THSpec
( spec
) where
import Language.GraphQL.TH (gql)
import Test.Hspec (Spec, describe, it, shouldBe)
spec :: Spec
spec =
describe "gql" $
it "replaces CRNL with NL" $
let expected = "line1\nline2\nline3"
actual = [gql|
line1
line2
line3
|]
in actual `shouldBe` expected