kotest-assertions-core / io.kotest.matchers.regex / kotlin.text.Regex

Extensions for kotlin.text.Regex

shouldBeRegex

Assert that Regex is equal to anotherRegex by comparing their pattern and options(RegexOption).

infix fun Regex.shouldBeRegex(anotherRegex: Regex): Unit

shouldHaveExactRegexOptions

Assert that Regex have exact regex options as regexOptions

infix fun Regex.shouldHaveExactRegexOptions(regexOptions: Set<RegexOption>): Unit

shouldHavePattern

Assert that Regex have pattern regexPattern.

infix fun Regex.shouldHavePattern(regexPattern: String): Unit

shouldIncludeRegexOption

Assert that Regex regex options include regexOption

infix fun Regex.shouldIncludeRegexOption(regexOption: RegexOption): Unit

shouldIncludeRegexOptions

Assert that Regex regex options include regexOptions

infix fun Regex.shouldIncludeRegexOptions(regexOptions: Set<RegexOption>): Unit

shouldNotBeRegex

Assert that Regex is not equal to anotherRegex by comparing their pattern and options(RegexOption).

infix fun Regex.shouldNotBeRegex(anotherRegex: Regex): Unit

shouldNotHaveExactRegexOptions

Assert that Regex does not have exact regex options as regexOptions

infix fun Regex.shouldNotHaveExactRegexOptions(regexOptions: Set<RegexOption>): Unit

shouldNotHavePattern

Assert that Regex does not have regexPattern.

infix fun Regex.shouldNotHavePattern(regexPattern: String): Unit

shouldNotIncludeRegexOption

Assert that Regex regex options does not include regexOption

infix fun Regex.shouldNotIncludeRegexOption(regexOption: RegexOption): Unit

shouldNotIncludeRegexOptions

Assert that Regex regex options does not include regexOptions

infix fun Regex.shouldNotIncludeRegexOptions(regexOptions: Set<RegexOption>): Unit