Browse files

Add failing test case for stringCI

  • Loading branch information...
1 parent 37ddb25 commit b3d5ab5d20d6e69b3addce77ee101b64b24800c5 @sol sol committed Jan 15, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 tests/QC/Text.hs
View
4 tests/QC/Text.hs
@@ -51,6 +51,9 @@ notChar w (NonEmpty s) = maybeP (P.notChar w) bs == if v == w
string s t = maybeP (P.string s') (s `L.append` t) == Just s'
where s' = toStrict s
+stringCI s = P.parseOnly (P.stringCI fs) s == Right s
+ where fs = T.toCaseFold s
+
toStrict = T.concat . L.toChunks
skipWhile w s =
@@ -95,6 +98,7 @@ tests = [
testProperty "notChar" notChar,
testProperty "anyChar" anyChar,
testProperty "string" string,
+ testProperty "stringCI" stringCI,
testProperty "skipWhile" skipWhile,
testProperty "takeCount" takeCount,
testProperty "takeWhile" takeWhile,

0 comments on commit b3d5ab5

Please sign in to comment.