Commits

Bryan O'Sullivan  committed c117991

Test new strip* functions.

  • Participants
  • Parent commits 3fbbd73

Comments (0)

Files changed (1)

File tests/Properties.hs

 prop_S_dropAfter p     = T.dropAfter p `eq` (S.reverse . S.dropWhile p . S.reverseStream)
 prop_T_dropAfter p     = (T.reverse . T.dropWhile p . T.reverse) `eq` T.dropAfter p
 prop_T_dropAround p    = (T.dropWhile p . T.dropAfter p) `eq` T.dropAround p
+prop_T_stripLeft       = T.dropWhile isSpace `eq` T.stripLeft
+prop_T_stripRight      = T.dropAfter isSpace `eq` T.stripRight
+prop_T_strip           = T.dropAround isSpace `eq` T.strip
 prop_T_splitAt n       = L.splitAt n   `eqP` (unpack2 . T.splitAt n)
 prop_TL_splitAt n      = L.splitAt n   `eqP` (unpack2 . TL.splitAt (fromIntegral n))
 prop_T_span p          = L.span p      `eqP` (unpack2 . T.span p)
   ("prop_S_dropAfter", mytest prop_S_dropAfter),
   ("prop_T_dropAfter", mytest prop_T_dropAfter),
   ("prop_T_dropAround", mytest prop_T_dropAround),
+  ("prop_T_stripLeft", mytest prop_T_stripLeft),
+  ("prop_T_stripRight", mytest prop_T_stripRight),
+  ("prop_T_strip", mytest prop_T_strip),
   ("prop_T_splitAt", mytest prop_T_splitAt),
   ("prop_T_span", mytest prop_T_span),
   ("prop_TL_span", mytest prop_TL_span),