]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/maxLength.json
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / s3select / rapidjson / bin / jsonschema / tests / draft4 / maxLength.json
diff --git a/ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/maxLength.json b/ceph/src/s3select/rapidjson/bin/jsonschema/tests/draft4/maxLength.json
new file mode 100644 (file)
index 0000000..811d35b
--- /dev/null
@@ -0,0 +1,33 @@
+[
+    {
+        "description": "maxLength validation",
+        "schema": {"maxLength": 2},
+        "tests": [
+            {
+                "description": "shorter is valid",
+                "data": "f",
+                "valid": true
+            },
+            {
+                "description": "exact length is valid",
+                "data": "fo",
+                "valid": true
+            },
+            {
+                "description": "too long is invalid",
+                "data": "foo",
+                "valid": false
+            },
+            {
+                "description": "ignores non-strings",
+                "data": 100,
+                "valid": true
+            },
+            {
+                "description": "two supplementary Unicode code points is long enough",
+                "data": "\uD83D\uDCA9\uD83D\uDCA9",
+                "valid": true
+            }
+        ]
+    }
+]