diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-08-04 08:30:00 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-08-04 08:30:00 +0200 |
| commit | 9d853798263742154cae682e368f8d2562fdb7ef (patch) | |
| tree | 81c53915e6103adf4e8bff88d9e1248c2763a6a3 /tests | |
| parent | 9b11300d23638f257543f90406b7ade6fd5118cb (diff) | |
| download | graphql-9d853798263742154cae682e368f8d2562fdb7ef.tar.gz | |
Remove cariage return from the qq string
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Language/GraphQL/THSpec.hs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Language/GraphQL/THSpec.hs b/tests/Language/GraphQL/THSpec.hs new file mode 100644 index 0000000..2858ab2 --- /dev/null +++ b/tests/Language/GraphQL/THSpec.hs @@ -0,0 +1,24 @@ +{- 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 |
