about summary refs log tree commit diff stats
path: root/lib/monoucha0/test/regexonly.nim
diff options
context:
space:
mode:
Diffstat (limited to 'lib/monoucha0/test/regexonly.nim')
-rw-r--r--lib/monoucha0/test/regexonly.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/monoucha0/test/regexonly.nim b/lib/monoucha0/test/regexonly.nim
new file mode 100644
index 00000000..345cd1f9
--- /dev/null
+++ b/lib/monoucha0/test/regexonly.nim
@@ -0,0 +1,12 @@
+import std/unittest
+
+import monoucha/jsregex
+import monoucha/optshim
+
+test "regex only":
+  let re = compileRegex(".*").get
+  check re.match("whatever")
+
+test r"\b":
+  let re = compileRegex"\bth\b".get
+  check not re.match("Weather")