[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 15:20:10 UTC 2010
The following commit has been merged in the master branch:
commit 4c93a99596fe4deea3b53501b20847544c68e796
Author: John Goerzen <jgoerzen at complete.org>
Date: Wed Dec 6 23:52:13 2006 +0100
Removed subRe, splitRe tests
diff --git a/testsrc/Strtest.hs b/testsrc/Strtest.hs
index a0e18a8..e4cd8f6 100644
--- a/testsrc/Strtest.hs
+++ b/testsrc/Strtest.hs
@@ -62,28 +62,6 @@ test_splitWs =
]
-test_splitRe =
- let f re inp exp = TestCase $ exp @=? splitRe (mkRegex re) inp
- in [
- f "foo" "" []
- ,f "foo" "foo" ["", ""]
- ,f "," "foo,bar,,baz," ["foo", "bar", "", "baz", ""]
- ,f "ba" ",foo,bar,,baz," [",foo,","r,,","z,"]
- ,f "," "" []
- ,f "," "," ["", ""]
- ]
-
-test_subRe =
- let f re inp repl exp = TestCase $ exp @=? subRe (mkRegex re) inp repl
- in [
- f "foo" "" "bar" ""
- ,f "foo" "This is a foo test bar" "bar" "This is a bar test bar"
- ,f "foo" "Test foo bar" "x\\0x" "Test xfoox bar"
- ,f "(f)(o)o" "Test foo bar" "\\2\\1" "Test of bar"
- ,f "foo" "Test foo then foo bar" "" "Test then bar"
- ,f "foo" "Test foo bar" "x\\\\x" "Test x\\x bar"
- ]
-
test_escapeRe =
map (\i -> TestLabel (show $ chr i) $ TestCase $ assertEqual [chr i] (Just [])
(matchRegex (mkRegex $ escapeRe $ [chr i]) [chr i]))
@@ -99,8 +77,6 @@ tests = TestList [TestLabel "lstrip" (TestList test_lstrip),
TestLabel "rstrip" $ TestList test_rstrip,
TestLabel "strip" $ TestList test_strip,
TestLabel "splitWs" $ TestList test_splitWs,
- TestLabel "subRe" $ TestList test_subRe,
- TestLabel "splitRe" $ TestList test_splitRe,
TestLabel "escapeRe" $ TestList test_escapeRe
]
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list