From dfeb021bb1bc8111f3273dd0e01c92cdaf1af70c Mon Sep 17 00:00:00 2001 From: Thomas Tanon Date: Thu, 5 Dec 2024 21:45:57 +0100 Subject: [PATCH] Add some tests covering regex quantifiers and options Based on XPath spec: https://www.w3.org/TR/xpath-functions/#regex-syntax Issue #46 --- sparql/sparql10/regex/index.html | 442 ++++++++++++++++++ sparql/sparql10/regex/manifest.ttl | 135 ++++++ .../sparql10/regex/regex-case-insensitive.rq | 8 + .../sparql10/regex/regex-case-insensitive.srx | 18 + .../regex/regex-char-class-expression.rq | 8 + .../regex/regex-char-class-expression.srx | 19 + .../sparql10/regex/regex-data-quantifiers.ttl | 4 + sparql/sparql10/regex/regex-dot-all.rq | 8 + sparql/sparql10/regex/regex-dot-all.srx | 24 + sparql/sparql10/regex/regex-dot.rq | 8 + sparql/sparql10/regex/regex-dot.srx | 18 + ...gex-ignore-whitespaces-class-expression.rq | 8 + ...ex-ignore-whitespaces-class-expression.srx | 14 + .../regex/regex-ignore-whitespaces.rq | 8 + .../regex/regex-ignore-whitespaces.srx | 13 + .../regex-negative-char-class-expression.rq | 8 + .../regex-negative-char-class-expression.srx | 19 + ...egex-no-metacharacters-case-insensitive.rq | 8 + .../sparql10/regex/regex-no-metacharacters.rq | 8 + .../regex/regex-no-metacharacters.srx | 13 + .../regex/regex-quantifier-counted-exact.rq | 8 + .../regex/regex-quantifier-counted-exact.srx | 13 + .../regex-quantifier-counted-lower-bound.rq | 8 + .../regex-quantifier-counted-lower-bound.srx | 23 + ...x-quantifier-counted-lower-upper-bounds.rq | 8 + ...-quantifier-counted-lower-upper-bounds.srx | 18 + .../regex/regex-quantifier-one-or-more.rq | 8 + .../regex/regex-quantifier-one-or-more.srx | 23 + .../regex/regex-quantifier-optional.rq | 8 + .../regex/regex-quantifier-optional.srx | 18 + .../regex/regex-quantifier-zero-or-more.rq | 8 + .../regex/regex-quantifier-zero-or-more.srx | 28 ++ .../regex/regex-start-end-multiline.rq | 8 + .../regex/regex-start-end-multiline.srx | 20 + sparql/sparql10/regex/regex-start-end.rq | 8 + sparql/sparql10/regex/regex-start-end.srx | 13 + 36 files changed, 1011 insertions(+) create mode 100644 sparql/sparql10/regex/regex-case-insensitive.rq create mode 100644 sparql/sparql10/regex/regex-case-insensitive.srx create mode 100644 sparql/sparql10/regex/regex-char-class-expression.rq create mode 100644 sparql/sparql10/regex/regex-char-class-expression.srx create mode 100644 sparql/sparql10/regex/regex-data-quantifiers.ttl create mode 100644 sparql/sparql10/regex/regex-dot-all.rq create mode 100644 sparql/sparql10/regex/regex-dot-all.srx create mode 100644 sparql/sparql10/regex/regex-dot.rq create mode 100644 sparql/sparql10/regex/regex-dot.srx create mode 100644 sparql/sparql10/regex/regex-ignore-whitespaces-class-expression.rq create mode 100644 sparql/sparql10/regex/regex-ignore-whitespaces-class-expression.srx create mode 100644 sparql/sparql10/regex/regex-ignore-whitespaces.rq create mode 100644 sparql/sparql10/regex/regex-ignore-whitespaces.srx create mode 100644 sparql/sparql10/regex/regex-negative-char-class-expression.rq create mode 100644 sparql/sparql10/regex/regex-negative-char-class-expression.srx create mode 100644 sparql/sparql10/regex/regex-no-metacharacters-case-insensitive.rq create mode 100644 sparql/sparql10/regex/regex-no-metacharacters.rq create mode 100644 sparql/sparql10/regex/regex-no-metacharacters.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-exact.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-exact.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-lower-bound.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-lower-bound.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-lower-upper-bounds.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-counted-lower-upper-bounds.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-one-or-more.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-one-or-more.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-optional.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-optional.srx create mode 100644 sparql/sparql10/regex/regex-quantifier-zero-or-more.rq create mode 100644 sparql/sparql10/regex/regex-quantifier-zero-or-more.srx create mode 100644 sparql/sparql10/regex/regex-start-end-multiline.rq create mode 100644 sparql/sparql10/regex/regex-start-end-multiline.srx create mode 100644 sparql/sparql10/regex/regex-start-end.rq create mode 100644 sparql/sparql10/regex/regex-start-end.srx diff --git a/sparql/sparql10/regex/index.html b/sparql/sparql10/regex/index.html index 7da821fb..8ecdfe9f 100644 --- a/sparql/sparql10/regex/index.html +++ b/sparql/sparql10/regex/index.html @@ -186,6 +186,448 @@

+
+ + regex-quantifier-optional: + + REGEX with an ? quantifier + REGEX with an ? quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-optional.srx +
+
+
+
+ + regex-quantifier-zero-or-more: + + REGEX with an * quantifier + REGEX with an * quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-zero-or-more.srx +
+
+
+
+ + regex-quantifier-one-or-more: + + REGEX with a + quantifier + REGEX with a + quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-one-or-more.srx +
+
+
+
+ + regex-quantifier-counted-exact: + + REGEX with an {2} quantifier + REGEX with an {2} quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-counted-exact.srx +
+
+
+
+ + regex-quantifier-counted-lower-bound: + + REGEX with an {,2} quantifier + REGEX with an {,2} quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-counted-lower-bound.srx +
+
+
+
+ + regex-quantifier-counted-lower-upper-bounds: + + REGEX with an {2,} quantifier + REGEX with an {2,} quantifier +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-quantifier-counted-lower-upper-bounds.srx +
+
+
+
+ + regex-dot: + + REGEX with an . operator + REGEX with an . operator +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-dot.srx +
+
+
+
+ + regex-dot-all: + + REGEX with an . operator and the s option + REGEX with an . operator and the s option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-dot-all.srx +
+
+
+
+ + regex-case-insensitive: + + REGEX with the i option + REGEX with the i option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-case-insensitive.srx +
+
+
+
+ + regex-no-metacharacters: + + REGEX with the q option + REGEX with the q option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-no-metacharacters.srx +
+
+
+
+ + regex-no-metacharacters-case-insensitive: + + REGEX with the iq option + REGEX with the iq option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-no-metacharacters.srx +
+
+
+
+ + regex-start-end: + + REGEX with ^ and $ + REGEX with ^ and $ +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-start-end.srx +
+
+
+
+ + regex-start-end-multiline: + + REGEX with ^ and $ and m option + REGEX with ^ and $ and m option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-start-end-multiline.srx +
+
+
+
+ + regex-char-class-expression: + + REGEX with [] expression + REGEX with [] expression +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-char-class-expression.srx +
+
+
+
+ + regex-negative-char-class-expression: + + REGEX with a [^] expression + REGEX with a [^] expression +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-negative-char-class-expression.srx +
+
+
+
+ + regex-ignore-whitespaces: + + REGEX with the ignore spacing (x) option + REGEX with the ignore spacing (x) option +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-ignore-whitespaces.srx +
+
+
+
+ + regex-ignore-whitespaces-class-expression: + + REGEX with the ignore spacing (x) option with class expression + REGEX with the ignore spacing (x) option with class expression +
+
+
+
+
+
type
+
mf:QueryEvaluationTest
+
approval
+
+
action
+
+
+
+
+
result
+
+ regex-ignore-whitespaces-class-expression.srx +
+
+