Skip to content
Permalink
Browse files

Dot matches all in regex test

  • Loading branch information...
sksamuel committed Sep 4, 2019
1 parent 18577f8 commit 7d2c4b4e775a1f5bca0dec8f7bf9709a9d8fb8b0
@@ -3,7 +3,7 @@ root = true
[*]

indent_style = space
indent_size = 2
indent_size = 3
max_line_length = 120

trim_trailing_whitespace = true
@@ -9,12 +9,12 @@ import io.kotlintest.specs.FunSpec
class GenRegexTest : FunSpec({

test("regex generation") {
val regex = "a.b."
val regex = "a.b.".toRegex(RegexOption.DOT_MATCHES_ALL)
Gen.regex(regex).random().take(1000).forAll { it.shouldMatch(regex) }
}

test("regex generation 2") {
val regex = "[a-z]-[0-9]abbc."
val regex = "[a-z]-[0-9]abbc.".toRegex(RegexOption.DOT_MATCHES_ALL)
Gen.regex(regex).random().take(1000).forAll { it.shouldMatch(regex) }
}
})

0 comments on commit 7d2c4b4

Please sign in to comment.
You can’t perform that action at this time.