Changeset: b7379c3b3a3d for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b7379c3b3a3d
Modified Files:
sql/test/Tests/regexp.test
Branch: regexp
Log Message:
Adds two more test for empty string flag with alternative
diffs (21 lines):
diff --git a/sql/test/Tests/regexp.test b/sql/test/Tests/regexp.test
--- a/sql/test/Tests/regexp.test
+++ b/sql/test/Tests/regexp.test
@@ -72,3 +72,17 @@ select regexp_replace('foobar', 'k?', '-
----
-f-o-o-b-a-r-
+# regex option - empty match w alternative v1
+query T rowsort
+select regexp_replace('abc', 'b|k?', '-', 'e')
+----
+-a--c-
+
+# regex option - empty match w alternative v2
+# even though you would expect -a--c- the pcre lib does not return
+# the longest match for this particular pattern in offset 1 ('b') but
+# an empty string match ¯\_(ツ)_/¯
+query T rowsort
+select regexp_replace('abc', 'k?|b', '-', 'e')
+----
+-a-b-c-
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]