diff --git a/wot-dijkstra/src/test/kotlin/org/pgpainless/wot/dijkstra/sq/RegexSetTest.kt b/wot-dijkstra/src/test/kotlin/org/pgpainless/wot/dijkstra/sq/RegexSetTest.kt new file mode 100644 index 00000000..daa7a17f --- /dev/null +++ b/wot-dijkstra/src/test/kotlin/org/pgpainless/wot/dijkstra/sq/RegexSetTest.kt @@ -0,0 +1,25 @@ +package org.pgpainless.wot.dijkstra.sq + +import kotlin.test.Test + +class RegexSetTest { + + @Test + fun simpleMatch() { + val stringList: List = listOf("<[^>]+[@.]foobank\\.com>$") + val rs = RegexSet.fromExpressionList(stringList); + + assert(rs.matches("Foo Bank Employee ")) + assert(rs.matches("")) + } + + @Test + fun simpleNonMatch() { + val stringList: List = listOf("<[^>]+[@.]foobank\\.com>$") + val rs = RegexSet.fromExpressionList(stringList); + + assert(!rs.matches("Bar Bank Employee ")) + assert(!rs.matches("")) + } + +} \ No newline at end of file