]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/pattern.json
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / s3select / rapidjson / bin / jsonschema / tests / draft4 / pattern.json
diff --git a/ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/pattern.json b/ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/pattern.json
new file mode 100644 (file)
index 0000000..25e7299
--- /dev/null
@@ -0,0 +1,34 @@
+[
+    {
+        "description": "pattern validation",
+        "schema": {"pattern": "^a*$"},
+        "tests": [
+            {
+                "description": "a matching pattern is valid",
+                "data": "aaa",
+                "valid": true
+            },
+            {
+                "description": "a non-matching pattern is invalid",
+                "data": "abc",
+                "valid": false
+            },
+            {
+                "description": "ignores non-strings",
+                "data": true,
+                "valid": true
+            }
+        ]
+    },
+    {
+        "description": "pattern is not anchored",
+        "schema": {"pattern": "a+"},
+        "tests": [
+            {
+                "description": "matches a substring",
+                "data": "xxaayy",
+                "valid": true
+            }
+        ]
+    }
+]