Skip to content

Commit

Permalink
Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
quchen committed Jun 15, 2018
1 parent 77008a2 commit abd0c49
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion prettyprinter/test/Testsuite/StripTrailingSpace.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{-# LANGUAGE CPP #-}
{-# LANGUAGE OverloadedStrings #-}

#include "version-compatibility-macros.h"

module StripTrailingSpace (testStripTrailingSpace) where


Expand All @@ -13,6 +16,12 @@ import Data.Text.Prettyprint.Doc.Render.Util.StackMachine
import Test.Tasty
import Test.Tasty.HUnit

#if !(APPLICATIVE_MONAD)
import Control.Applicative
#endif



box :: Text -> Text
box singleLine = unlines'
[ "┌─" <> T.replicate (T.length singleLine) "" <> "─┐"
Expand Down Expand Up @@ -40,7 +49,7 @@ testStripTrailingSpace = testGroup "Stripping trailing space"
, testCase "Multiple spaces inside"
(testStripping ("Multiple spaces" <> " " <> "inside"))
, testCase "Whitespace inside text"
(testStripping ("Whitespace inside text "))
(testStripping "Whitespace inside text ")
, testCase "Indented blank line"
(testStripping (nest 4 (vcat ["Indented blank line", "", "<end>"])))
, testCase "Multiple indented blank lines"
Expand Down

0 comments on commit abd0c49

Please sign in to comment.