diff options
Diffstat (limited to 'json/tests/draft3/optional/format/color.json')
-rw-r--r-- | json/tests/draft3/optional/format/color.json | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/json/tests/draft3/optional/format/color.json b/json/tests/draft3/optional/format/color.json new file mode 100644 index 0000000..e80cb69 --- /dev/null +++ b/json/tests/draft3/optional/format/color.json @@ -0,0 +1,38 @@ +[ + { + "description": "validation of CSS colors", + "schema": {"format": "color"}, + "tests": [ + { + "description": "a valid CSS color name", + "data": "fuchsia", + "valid": true + }, + { + "description": "a valid six-digit CSS color code", + "data": "#CC8899", + "valid": true + }, + { + "description": "a valid three-digit CSS color code", + "data": "#C89", + "valid": true + }, + { + "description": "an invalid CSS color code", + "data": "#00332520", + "valid": false + }, + { + "description": "an invalid CSS color name", + "data": "puce", + "valid": false + }, + { + "description": "a CSS color name containing invalid characters", + "data": "light_grayish_red-violet", + "valid": false + } + ] + } +] |