aboutsummaryrefslogtreecommitdiff
path: root/tests/sql_match.ml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/sql_match.ml')
-rw-r--r--tests/sql_match.ml12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/sql_match.ml b/tests/sql_match.ml
new file mode 100644
index 0000000..0314bb3
--- /dev/null
+++ b/tests/sql_match.ml
@@ -0,0 +1,12 @@
+open OUnit2
+
+let test_suit =
+ [
+ ( "Parse regex" >:: fun _ ->
+ let text = Sqlite3.Data.TEXT "hello world"
+ and regex = Sqlite3.Data.TEXT "hello ([A-Za-z]+)" in
+
+ assert_equal (Sqlite3.Data.TEXT "world") (ImportSQL.Match.f regex text) );
+ ]
+
+let tests = "sql_match" >::: test_suit