Skip to content

Commit

Permalink
Dot matches all in regex test
Browse files Browse the repository at this point in the history
  • Loading branch information
sksamuel committed Sep 4, 2019
1 parent 18577f8 commit 7d2c4b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ root = true
[*]

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

trim_trailing_whitespace = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.