regex-examples 1.0.1.2 → 1.0.1.3
raw patch · 5 files changed
+99/−90 lines, 5 filesdep ~regexdep ~regex-with-pcre
Dependency ranges changed: regex, regex-with-pcre
Files
- changelog +3/−0
- examples/re-tests.lhs +31/−25
- lib/mega-regex.cabal +29/−29
- lib/version.txt +1/−1
- regex-examples.cabal +35/−35
changelog view
@@ -1,5 +1,8 @@ -*-change-log-*- +1.0.1.3 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-06-05+ * Suspending UTF-8 tests for Windows/PCRE (#144)+ 1.0.1.2 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-06-05 * Permit utf8-string-1 (#142)
examples/re-tests.lhs view
@@ -44,6 +44,7 @@ import Prelude.Compat import System.Directory import System.FilePath+import qualified System.Info as SI import Test.SmallCheck.Series import Test.Tasty import Test.Tasty.HUnit@@ -72,28 +73,28 @@ import Text.RE.ZeInternals import qualified Text.Regex.PCRE as PCRE_ import qualified Text.Regex.TDFA as TDFA_-- \end{code} \begin{code} main :: IO ()-main = defaultMain $- testGroup "Tests"- [ prelude_tests- , compiling_tests- , core_tests- , replace_methods_tests- , search_replace_tests- , options_tests- , named_capture_tests- , many_tests- , escape_tests- , add_capture_names_tests- , find_tests- , misc_tests- ]+main = do+ print SI.os+ defaultMain $+ testGroup "Tests"+ [ prelude_tests+ , compiling_tests+ , core_tests+ , replace_methods_tests+ , search_replace_tests+ , options_tests+ , named_capture_tests+ , many_tests+ , escape_tests+ , add_capture_names_tests+ , find_tests+ , misc_tests+ ] \end{code} @@ -364,7 +365,7 @@ \begin{code} search_replace_tests :: TestTree-search_replace_tests = testGroup "SearchReplace"+search_replace_tests = testGroup "SearchReplace" $ [ testCase "?=~/ [ed_| ... |]" $ "baz bar foobar" @=? "foo bar foobar" T_ST.?=~/ [ed_|foo///baz|] () , testCase "*=~/ [ed_| ... |]" $ "baz bar bazbar" @=? "foo bar foobar" T_ST.*=~/ [ed_|foo///baz|] MultilineSensitive , testCase "TDFA.ed/String" $ test id tdfa_eds@@ -393,21 +394,26 @@ , testg "PCRE.op/LT" (PLTX.?=~/) (PLTX.*=~/) pcre_sr_lt , testG "TDFA.op/S" (T_SQ.?=~/) (T_SQ.*=~/) tdfa_sr_s , testG "PCRE.op/S" (P_SQ.?=~/) (P_SQ.*=~/) pcre_sr_s- , testu "PCRE.U/String" id (P_ST.*=~/) [P_ST.ed|scientist///boffin|] (P_ST.*=~) [P_ST.re|λ-|]- , testu "PCRE.U/B" B.fromString (P_BS.*=~/) [P_BS.ed|scientist///boffin|] (P_BS.*=~) [P_BS.re|λ-|]- , testu "PCRE.U/LBS" LBS.fromString (PLBS.*=~/) [PLBS.ed|scientist///boffin|] (PLBS.*=~) [PLBS.re|λ-|]- , testu "PCRE.U/T" T.pack (P_TX.*=~/) [P_TX.ed|scientist///boffin|] (P_TX.*=~) [P_TX.re|λ-|]- , testu "PCRE.U/LT" LT.pack (PLTX.*=~/) [PLTX.ed|scientist///boffin|] (PLTX.*=~) [PLTX.re|λ-|]- , testu "PCRE.U/S" S.fromList (P_SQ.*=~/) [P_SQ.ed|scientist///boffin|] (P_SQ.*=~) [P_SQ.re|burble|] , testu "TDFA.U/String" id (T_ST.*=~/) [T_ST.ed|scientist///boffin|] (T_ST.*=~) [T_ST.re|λ-|] , testu "TDFA.U/B" B.fromString (T_BS.*=~/) [T_BS.ed|scientist///boffin|] (T_BS.*=~) [T_BS.re|burble|] , testu "TDFA.U/LBS" LBS.fromString (TLBS.*=~/) [TLBS.ed|scientist///boffin|] (TLBS.*=~) [TLBS.re|burble|] , testu "TDFA.U/T" T.pack (T_TX.*=~/) [T_TX.ed|scientist///boffin|] (T_TX.*=~) [T_TX.re|λ-|] , testu "TDFA.U/LT" LT.pack (TLTX.*=~/) [TLTX.ed|scientist///boffin|] (TLTX.*=~) [TLTX.re|λ-|] , testu "TDFA.U/S" S.fromList (T_SQ.*=~/) [T_SQ.ed|scientist///boffin|] (T_SQ.*=~) [T_SQ.re|λ-|]-+ ] ++ not_win32_for_now+ [ testu "PCRE.U/String" id (P_ST.*=~/) [P_ST.ed|scientist///boffin|] (P_ST.*=~) [P_ST.re|λ-|]+ , testu "PCRE.U/B" B.fromString (P_BS.*=~/) [P_BS.ed|scientist///boffin|] (P_BS.*=~) [P_BS.re|λ-|]+ , testu "PCRE.U/LBS" LBS.fromString (PLBS.*=~/) [PLBS.ed|scientist///boffin|] (PLBS.*=~) [PLBS.re|λ-|]+ , testu "PCRE.U/T" T.pack (P_TX.*=~/) [P_TX.ed|scientist///boffin|] (P_TX.*=~) [P_TX.re|λ-|]+ , testu "PCRE.U/LT" LT.pack (PLTX.*=~/) [PLTX.ed|scientist///boffin|] (PLTX.*=~) [PLTX.re|λ-|]+ , testu "PCRE.U/S" S.fromList (P_SQ.*=~/) [P_SQ.ed|scientist///boffin|] (P_SQ.*=~) [P_SQ.re|burble|] ] where+ not_win32_for_now :: [a] -> [a]+ not_win32_for_now = case SI.os == "mingw32" of+ True -> const []+ False -> id+ test :: IsRegex re a => (String->a) -> Edits Identity re a -> Assertion test inj eds = inj rsm @=? runIdentity (sed' eds $ inj inp)
lib/mega-regex.cabal view
@@ -1,5 +1,5 @@ Name: regex-Version: 1.0.1.2+Version: 1.0.1.3 Synopsis: Toolkit for regex-base Description: A regular expression toolkit for regex-base with compile-time checking of RE syntax, data types for@@ -68,7 +68,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 1.0.1.2+ Tag: 1.0.1.3 @@ -211,7 +211,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -241,7 +241,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -271,7 +271,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -300,7 +300,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -329,7 +329,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -355,7 +355,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -381,7 +381,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -415,7 +415,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -449,7 +449,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -478,7 +478,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -507,7 +507,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -534,7 +534,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -561,7 +561,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -602,7 +602,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -643,7 +643,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , blaze-html >= 0.8.1.0@@ -676,7 +676,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , blaze-html >= 0.8.1.0@@ -710,7 +710,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -754,7 +754,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -800,7 +800,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -844,7 +844,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -888,7 +888,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -932,7 +932,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -976,7 +976,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -1020,7 +1020,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -1064,7 +1064,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -1108,7 +1108,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -1153,7 +1153,7 @@ -Werror Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10
lib/version.txt view
@@ -1,1 +1,1 @@-1.0.1.2+1.0.1.3
regex-examples.cabal view
@@ -1,5 +1,5 @@ Name: regex-examples-Version: 1.0.1.2+Version: 1.0.1.3 Synopsis: Tutorial, tests and example programs for regex Description: Tutorial, tests and example programs for regex, a Regular Expression Toolkit for regex-base with@@ -68,7 +68,7 @@ Source-Repository this Type: git Location: https://github.com/iconnect/regex.git- Tag: 1.0.1.2+ Tag: 1.0.1.3 Executable re-gen-cabals@@ -87,7 +87,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -117,7 +117,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -147,7 +147,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -176,7 +176,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -205,7 +205,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -231,7 +231,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -257,8 +257,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -292,8 +292,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -327,7 +327,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -356,7 +356,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -385,7 +385,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -412,7 +412,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , bytestring == 0.10.*@@ -439,8 +439,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -481,8 +481,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -523,7 +523,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , blaze-html >= 0.8.1.0@@ -556,7 +556,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10 , blaze-html >= 0.8.1.0@@ -590,7 +590,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -634,7 +634,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -680,7 +680,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -724,8 +724,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -769,8 +769,8 @@ -Wwarn Build-depends:- regex == 1.0.1.2- , regex-with-pcre == 1.0.1.2+ regex == 1.0.1.3+ , regex-with-pcre == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -814,7 +814,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -858,7 +858,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -902,7 +902,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -946,7 +946,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -990,7 +990,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10@@ -1035,7 +1035,7 @@ -Wwarn Build-depends:- regex == 1.0.1.2+ regex == 1.0.1.3 , array >= 0.4 && < 0.6 , base >= 4 && < 5 , base-compat >= 0.6 && < 0.10