summaryrefslogtreecommitdiff
path: root/testsuite/tests/lib/Regex/regex001.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/lib/Regex/regex001.hs')
-rw-r--r--testsuite/tests/lib/Regex/regex001.hs11
1 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/lib/Regex/regex001.hs b/testsuite/tests/lib/Regex/regex001.hs
new file mode 100644
index 0000000000..1c9393c1b2
--- /dev/null
+++ b/testsuite/tests/lib/Regex/regex001.hs
@@ -0,0 +1,11 @@
+module Main where
+
+import Control.Exception
+import Text.Regex.Posix
+
+-- caused GHC 6.0 to crash, due to regfree'ing the regex after a
+-- failed regcomp.
+main = sequence_
+ [ try ("abc" =~~ "[[[" :: IO Bool) :: IO (Either IOException Bool)
+ | _ <- [1..10000] ]
+